[libclc] 156/291: prepare-builtins: Fix broken build due to recent LLVM API change

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit 0ec7437d9c9be1df92872217ec22a15aa56abcf5
Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Mon Jul 7 17:46:45 2014 +0000

    prepare-builtins: Fix broken build due to recent LLVM API change
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@212470 91177308-0d34-0410-b5e6-96231b3b80d8
---
 utils/prepare-builtins.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
index 20890ed..ce84148 100644
--- a/utils/prepare-builtins.cpp
+++ b/utils/prepare-builtins.cpp
@@ -47,8 +47,15 @@ int main(int argc, char **argv) {
   std::auto_ptr<Module> M;
 
   {
+#if LLVM_350_AND_NEWER
+    ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
+      MemoryBuffer::getFile(InputFilename);
+    std::unique_ptr<MemoryBuffer> &BufferPtr = BufferOrErr.get();
+    if (std::error_code  ec = BufferOrErr.getError())
+#else
     UNIQUE_PTR<MemoryBuffer> BufferPtr;
     if (ERROR_CODE ec = MemoryBuffer::getFileOrSTDIN(InputFilename, BufferPtr))
+#endif
       ErrorMessage = ec.message();
     else {
 #if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list