]> granicus.if.org Git - clang/commitdiff
libclang: Don't allow RemoveFileOnSignal to be called via libclang, badness can
authorDaniel Dunbar <daniel@zuster.org>
Mon, 31 Jan 2011 22:00:44 +0000 (22:00 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 31 Jan 2011 22:00:44 +0000 (22:00 +0000)
ensue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124613 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/FrontendActions.cpp

index eb7152cb4741078bd6e076e9a58029bbe85144b1..0ffea201cd485d9c7df8d3cd88f5aee1d2bac1a6 100644 (file)
@@ -104,7 +104,10 @@ bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI,
     return true;
   }
 
-  OS = CI.createDefaultOutputFile(true, InFile);
+  // We use createOutputFile here because this is exposed via libclang, and we
+  // must disable the RemoveFileOnSignal behavior.
+  OS = CI.createOutputFile(CI.getFrontendOpts().OutputFile, /*Binary=*/true,
+                           /*RemoveFileOnSignal=*/false, InFile);
   if (!OS)
     return true;