libclang: Don't allow RemoveFileOnSignal to be called via libclang, badness can
ensue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124613 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index eb7152c..0ffea20 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -104,7 +104,10 @@
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;