diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-07-11 17:35:46 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-07-11 17:35:46 +0000 |
commit | 4c3fa43392083fbab905ae3fc61359f07edf8d07 (patch) | |
tree | 7b9c276fdefd54c4a6462063f16b1f2b860f533d | |
parent | f067a233562d3cfeb29d0092d1069bb8d25cad31 (diff) | |
download | external_llvm-4c3fa43392083fbab905ae3fc61359f07edf8d07.zip external_llvm-4c3fa43392083fbab905ae3fc61359f07edf8d07.tar.gz external_llvm-4c3fa43392083fbab905ae3fc61359f07edf8d07.tar.bz2 |
Erase the temp dir before starting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75367 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/llvmc/example/mcc16/driver/Main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/llvmc/example/mcc16/driver/Main.cpp b/tools/llvmc/example/mcc16/driver/Main.cpp index e00d10f..55e948a 100644 --- a/tools/llvmc/example/mcc16/driver/Main.cpp +++ b/tools/llvmc/example/mcc16/driver/Main.cpp @@ -15,6 +15,7 @@ #include "llvm/CompilerDriver/BuiltinOptions.h" #include "llvm/CompilerDriver/ForceLinkage.h" +#include "llvm/System/Path.h" namespace llvmc { int Main(int argc, char** argv); @@ -24,8 +25,14 @@ int main(int argc, char** argv) { // HACK SaveTemps.setHiddenFlag(llvm::cl::Hidden); + SaveTemps = SaveTempsEnum::Unset; TempDirname = "tmp-objs"; + // Remove the temp dir if already exists. + llvm::sys::Path tempDir; + tempDir = TempDirname; + tempDir.eraseFromDisk(true); + llvmc::ForceLinkage(); return llvmc::Main(argc, argv); } |