[Libclc-dev] [PATCH v2 libclc 2/2] Fix build against LLVM SVN >= r216488
Michel Dänzer
michel at daenzer.net
Tue Aug 26 20:48:02 PDT 2014
From: Michel Dänzer <michel.daenzer at amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
v2: Simplify
utils/prepare-builtins.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
index afa64a8..ee51edf 100644
--- a/utils/prepare-builtins.cpp
+++ b/utils/prepare-builtins.cpp
@@ -62,7 +62,12 @@ int main(int argc, char **argv) {
ErrorMessage = ec.message();
else {
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
+# if LLVM_360_AND_NEWER
+ ErrorOr<Module *> ModuleOrErr =
+ parseBitcodeFile(BufferPtr.get()->getMemBufferRef(), Context);
+# else
ErrorOr<Module *> ModuleOrErr = parseBitcodeFile(BufferPtr.get(), Context);
+# endif
if (ERROR_CODE ec = ModuleOrErr.getError())
ErrorMessage = ec.message();
M.reset(ModuleOrErr.get());
--
2.1.0
More information about the Libclc-dev
mailing list