diff options
| author | Michel Danzer <michel.daenzer@amd.com> | 2014-08-28 06:19:33 +0000 |
|---|---|---|
| committer | Michel Danzer <michel.daenzer@amd.com> | 2014-08-28 06:19:33 +0000 |
| commit | a10b492ce3008cfb932ab4844424c43951dedd8c (patch) | |
| tree | f2b7108404e51a6886d8205e63e5dbce826974f1 /libclc | |
| parent | 01bdb7a971513549979abc48596cf6741189b5de (diff) | |
| download | bcm5719-llvm-a10b492ce3008cfb932ab4844424c43951dedd8c.tar.gz bcm5719-llvm-a10b492ce3008cfb932ab4844424c43951dedd8c.zip | |
Fix build against LLVM SVN >= r216393
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 216653
Diffstat (limited to 'libclc')
| -rw-r--r-- | libclc/utils/prepare-builtins.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libclc/utils/prepare-builtins.cpp b/libclc/utils/prepare-builtins.cpp index 726866e2a1a..afa64a8b93c 100644 --- a/libclc/utils/prepare-builtins.cpp +++ b/libclc/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()); |

