[libclc] r314111 - prepare_builtins: Fix compile breakage with older LLVM

Jan Vesely via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 09:04:37 PDT 2017


Author: jvesely
Date: Mon Sep 25 09:04:37 2017
New Revision: 314111

URL: http://llvm.org/viewvc/llvm-project?rev=314111&view=rev
Log:
prepare_builtins: Fix compile breakage with older LLVM

Fixes r314050

reviewer: Tom Stellard

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>

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=314111&r1=314110&r2=314111&view=diff
==============================================================================
--- libclc/trunk/utils/prepare-builtins.cpp (original)
+++ libclc/trunk/utils/prepare-builtins.cpp Mon Sep 25 09:04:37 2017
@@ -84,8 +84,13 @@ int main(int argc, char **argv) {
   }
 
   std::error_code EC;
+#if HAVE_LLVM >= 0x0600
   std::unique_ptr<ToolOutputFile> Out(
       new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+#else
+  std::unique_ptr<tool_output_file> Out(
+      new tool_output_file(OutputFilename, EC, sys::fs::F_None));
+#endif
   if (EC) {
     errs() << EC.message() << '\n';
     exit(1);




More information about the cfe-commits mailing list