Use the sys::RemoveFileOnSignal that takes a StringRef.

llvm-svn: 183944
This commit is contained in:
Rafael Espindola 2013-06-13 21:02:40 +00:00
parent da85674db5
commit 18556de316
2 changed files with 2 additions and 2 deletions

View File

@ -560,7 +560,7 @@ CompilerInstance::createOutputFile(StringRef OutputPath,
// Make sure the out stream file gets removed if we crash.
if (RemoveFileOnSignal)
llvm::sys::RemoveFileOnSignal(llvm::sys::Path(OSFile));
llvm::sys::RemoveFileOnSignal(OSFile);
if (ResultPathName)
*ResultPathName = OutFile;

View File

@ -245,7 +245,7 @@ static formatted_raw_ostream *GetOutputStream(AssemblerInvocation &Opts,
// Make sure that the Out file gets unlinked from the disk if we get a
// SIGINT.
if (Opts.OutputPath != "-")
sys::RemoveFileOnSignal(sys::Path(Opts.OutputPath));
sys::RemoveFileOnSignal(Opts.OutputPath);
std::string Error;
raw_fd_ostream *Out =