From: Daniel Dunbar Date: Mon, 31 Jan 2011 22:00:44 +0000 (+0000) Subject: libclang: Don't allow RemoveFileOnSignal to be called via libclang, badness can X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7a9cda0eb24762a3e9c892b1f4bdc6deb5de0a6;p=clang 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 eb7152cb47..0ffea201cd 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/lib/Frontend/FrontendActions.cpp @@ -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;