summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/llvm
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2014-08-28 12:05:21 +0900
committerMichel Dänzer <[email protected]>2014-08-28 12:05:21 +0900
commiteae9da879f3143507ef0e238a7e4faa87114d54e (patch)
tree8e812e21aae9f8ad3ed6fcdefd8894386e999eb6 /src/gallium/state_trackers/clover/llvm
parenteee9f6ae8aa058c70cc499fda7b521c5a5161338 (diff)
st/clover: Fix build against LLVM SVN >= r216583
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm')
-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