[libclc] r216654 - Fix build against LLVM SVN >= r216488
Michel Danzer
michel.daenzer at amd.com
Wed Aug 27 23:19:38 PDT 2014
Author: daenzer
Date: Thu Aug 28 01:19:37 2014
New Revision: 216654
URL: http://llvm.org/viewvc/llvm-project?rev=216654&view=rev
Log:
Fix build against LLVM SVN >= r216488
Tested-by: Aaron Watry <awatry at gmail.com>
Modified:
libclc/trunk/utils/prepare-builtins.cpp
Modified: libclc/trunk/utils/prepare-builtins.cpp
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/utils/prepare-builtins.cpp?rev=216654&r1=216653&r2=216654&view=diff
==============================================================================
--- libclc/trunk/utils/prepare-builtins.cpp (original)
+++ libclc/trunk/utils/prepare-builtins.cpp Thu Aug 28 01:19:37 2014
@@ -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());
More information about the cfe-commits
mailing list