1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

delete file portably

llvm-svn: 25048
This commit is contained in:
Duraid Madina 2005-12-30 02:47:21 +00:00
parent 3441657fb4
commit c2dd544342

View File

@ -24,6 +24,7 @@
#include "llvm/Support/CommandLine.h" #include "llvm/Support/CommandLine.h"
#include "llvm/Support/PluginLoader.h" #include "llvm/Support/PluginLoader.h"
#include "llvm/Support/PassNameParser.h" #include "llvm/Support/PassNameParser.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Analysis/Verifier.h" #include "llvm/Analysis/Verifier.h"
#include "llvm/System/Signals.h" #include "llvm/System/Signals.h"
#include "llvm/Config/config.h" #include "llvm/Config/config.h"
@ -244,7 +245,7 @@ int main(int argc, char **argv) {
<< "' does not support generation of this file type!\n"; << "' does not support generation of this file type!\n";
if (Out != &std::cout) delete Out; if (Out != &std::cout) delete Out;
// And the Out file is empty and useless, so remove it now. // And the Out file is empty and useless, so remove it now.
std::remove(OutputFilename.c_str()); sys::Path(OutputFilename).eraseFromDisk();
return 1; return 1;
} else { } else {
// Run our queue of passes all at once now, efficiently. // Run our queue of passes all at once now, efficiently.