summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index d351bc5c3a2..7bca0d68357 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -211,8 +211,13 @@ namespace {
&c.getDiagnosticOpts()));
#endif
+#if HAVE_LLVM >= 0x0306
+ c.getPreprocessorOpts().addRemappedFile(name,
+ llvm::MemoryBuffer::getMemBuffer(source).release());
+#else
c.getPreprocessorOpts().addRemappedFile(name,
llvm::MemoryBuffer::getMemBuffer(source));
+#endif
// Setting this attribute tells clang to link this file before
// performing any optimizations. This is required so that