diff options
Diffstat (limited to '8543 clover Fix build with llvm-12.patch')
-rw-r--r-- | 8543 clover Fix build with llvm-12.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/8543 clover Fix build with llvm-12.patch b/8543 clover Fix build with llvm-12.patch new file mode 100644 index 000000000000..4c221d544461 --- /dev/null +++ b/8543 clover Fix build with llvm-12.patch @@ -0,0 +1,42 @@ +From 67b36d1e81dcdce97daa6eab4a6a7e60c6d3949a Mon Sep 17 00:00:00 2001 +From: Vinson Lee <vlee@freedesktop.org> +Date: Sat, 16 Jan 2021 22:55:41 -0800 +Subject: [PATCH] clover: Fix build with llvm-12. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC: +Decrease the scope of ParseLangArgs parameters"). + +../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’: +../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector<std::__cxx11::basic_string<char> >&’ + 252 | c->getPreprocessorOpts(), + | ~~~~~~~~~~~~~~~~~~~~~~^~ + | | + | clang::PreprocessorOptions + +Signed-off-by: Vinson Lee <vlee@freedesktop.org> +--- + src/gallium/frontends/clover/llvm/invocation.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp +index be0f3976b92..bcbec21cd1c 100644 +--- a/src/gallium/frontends/clover/llvm/invocation.cpp ++++ b/src/gallium/frontends/clover/llvm/invocation.cpp +@@ -249,7 +249,11 @@ namespace { + + c->getInvocation().setLangDefaults(c->getLangOpts(), + compat::ik_opencl, ::llvm::Triple(target.triple), ++#if LLVM_VERSION_MAJOR >= 12 ++ c->getPreprocessorOpts().Includes, ++#else + c->getPreprocessorOpts(), ++#endif + get_language_version(opts, device_clc_version)); + + c->createDiagnostics(new clang::TextDiagnosticPrinter( +-- +GitLab + |