[libclc] 178/291: Fix build against LLVM SVN >= r216393
Andreas Beckmann
anbe at moszumanska.debian.org
Tue Sep 8 10:53:47 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 2d5b8945fa27bf945c46a969e11f4bf37f542e39
Author: Michel Danzer <michel.daenzer at amd.com>
Date: Thu Aug 28 06:19:33 2014 +0000
Fix build against LLVM SVN >= r216393
Tested-by: Aaron Watry <awatry at gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@216653 91177308-0d34-0410-b5e6-96231b3b80d8
---
utils/prepare-builtins.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
index 726866e..afa64a8 100644
--- a/utils/prepare-builtins.cpp
+++ b/utils/prepare-builtins.cpp
@@ -12,6 +12,9 @@
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Config/llvm-config.h"
+#define LLVM_360_AND_NEWER \
+ (LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 6))
+
#define LLVM_350_AND_NEWER \
(LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5))
@@ -95,6 +98,15 @@ int main(int argc, char **argv) {
return 1;
}
+#if LLVM_360_AND_NEWER
+ std::error_code EC;
+ UNIQUE_PTR<tool_output_file> Out
+ (new tool_output_file(OutputFilename, EC, sys::fs::F_None));
+ if (EC) {
+ errs() << EC.message() << '\n';
+ exit(1);
+ }
+#else
std::string ErrorInfo;
UNIQUE_PTR<tool_output_file> Out
(new tool_output_file(OutputFilename.c_str(), ErrorInfo,
@@ -109,6 +121,7 @@ int main(int argc, char **argv) {
errs() << ErrorInfo << '\n';
exit(1);
}
+#endif // LLVM_360_AND_NEWER
WriteBitcodeToFile(M.get(), Out->os());
--
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