Skip to content

Commit 7b77ab7

Browse files
author
Michel Danzer
committed
Fix build against LLVM SVN >= r216488
Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 216654
1 parent a10b492 commit 7b77ab7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libclc/utils/prepare-builtins.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ int main(int argc, char **argv) {
6262
ErrorMessage = ec.message();
6363
else {
6464
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
65+
# if LLVM_360_AND_NEWER
66+
ErrorOr<Module *> ModuleOrErr =
67+
parseBitcodeFile(BufferPtr.get()->getMemBufferRef(), Context);
68+
# else
6569
ErrorOr<Module *> ModuleOrErr = parseBitcodeFile(BufferPtr.get(), Context);
70+
# endif
6671
if (ERROR_CODE ec = ModuleOrErr.getError())
6772
ErrorMessage = ec.message();
6873
M.reset(ModuleOrErr.get());

0 commit comments

Comments
 (0)