[Beignet] [PATCH] GBE: fix build error with LLVM 3.5 and previous version.
Zhigang Gong
zhigang.gong at intel.com
Tue Sep 8 18:08:01 PDT 2015
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
backend/src/backend/program.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
index 330bead..57a5037 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -575,7 +575,12 @@ namespace gbe {
Diags);
llvm::StringRef srcString(source);
(*CI).getPreprocessorOpts().addRemappedFile("stringInput.cl",
- llvm::MemoryBuffer::getMemBuffer(srcString).release());
+#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR <= 5
+ llvm::MemoryBuffer::getMemBuffer(srcString)
+#else
+ llvm::MemoryBuffer::getMemBuffer(srcString).release()
+#endif
+ );
// Create the compiler instance
clang::CompilerInstance Clang;
--
1.9.1
More information about the Beignet
mailing list