43 lines
2.0 KiB
Diff
43 lines
2.0 KiB
Diff
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
|
||
|