[Mesa-dev] [PATCH] st/clover: Fix build against LLVM SVN >= r216583

Michel Dänzer michel at daenzer.net
Wed Aug 27 20:06:16 PDT 2014


From: Michel Dänzer <michel.daenzer at amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/gallium/state_trackers/clover/llvm/invocation.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index d351bc5..7bca0d6 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
-- 
2.1.0



More information about the mesa-dev mailing list