Add uppercase and lowercase part defines in driver.
[oota-llvm.git] / tools / llvmc / example / mcc16 / driver / Main.cpp
index 5d50f9d4a396775617c4104681687a3ace1b6fb1..43d6c048f99614893e7790fe653f164f9bcde7e5 100644 (file)
@@ -37,10 +37,16 @@ int main(int argc, char** argv) {
   DryRun.setHiddenFlag(llvm::cl::Hidden);
 
   llvm::cl::SetVersionPrinter(PIC16VersionPrinter); 
-  
-  TempDirname = "tmp-objs";
 
-  // Remove the temp dir if already exists.
+  // Ask for a standard temp dir, but just cache its basename., and delete it.
+  llvm::sys::Path tempDir;
+  tempDir = llvm::sys::Path::GetTemporaryDirectory();
+  TempDirname = tempDir.getBasename();
+  tempDir.eraseFromDisk(true);
+
+  // We are creating a temp dir in current dir, with the cached name.
+  //  But before that remove if one already exists with that name..
+
   llvm::sys::Path tempDir;
   tempDir = TempDirname;
   tempDir.eraseFromDisk(true);