Convert some uses of eraseFromDisk.

llvm-svn: 184196
This commit is contained in:
Rafael Espindola 2013-06-18 15:33:18 +00:00
parent 4cc5552b9b
commit 75d8fa51c9
1 changed files with 3 additions and 3 deletions

View File

@ -219,10 +219,10 @@ bool BugDriver::runPasses(Module *Program,
// If we are supposed to delete the bitcode file or if the passes crashed,
// remove it now. This may fail if the file was never created, but that's ok.
if (DeleteOutput || result != 0)
sys::Path(OutputFilename).eraseFromDisk();
sys::fs::remove(OutputFilename);
// Remove the temporary input file as well
inputFilename.eraseFromDisk();
sys::fs::remove(inputFilename.c_str());
if (!Quiet) {
if (result == 0)
@ -270,6 +270,6 @@ Module *BugDriver::runPassesOn(Module *M,
<< BitcodeResult << "'!\n";
exit(1);
}
sys::Path(BitcodeResult).eraseFromDisk(); // No longer need the file on disk
sys::fs::remove(BitcodeResult);
return Ret;
}