[llvm-commits] CVS: llvm/tools/bugpoint/CrashDebugger.cpp ExecutionDriver.cpp Miscompilation.cpp OptimizerDriver.cpp

Reid Spencer reid at x10sys.com
Thu Jul 7 16:22:01 PDT 2005



Changes in directory llvm/tools/bugpoint:

CrashDebugger.cpp updated: 1.42 -> 1.43
ExecutionDriver.cpp updated: 1.54 -> 1.55
Miscompilation.cpp updated: 1.65 -> 1.66
OptimizerDriver.cpp updated: 1.31 -> 1.32
---
Log message:

For PR495: http://llvm.cs.uiuc.edu/PR495 :
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a 
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.


---
Diffs of the changes:  (+15 -14)

 CrashDebugger.cpp   |    4 ++--
 ExecutionDriver.cpp |   11 ++++++-----
 Miscompilation.cpp  |   10 +++++-----
 OptimizerDriver.cpp |    4 ++--
 4 files changed, 15 insertions(+), 14 deletions(-)


Index: llvm/tools/bugpoint/CrashDebugger.cpp
diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.42 llvm/tools/bugpoint/CrashDebugger.cpp:1.43
--- llvm/tools/bugpoint/CrashDebugger.cpp:1.42	Thu Apr 21 18:59:23 2005
+++ llvm/tools/bugpoint/CrashDebugger.cpp	Thu Jul  7 18:21:43 2005
@@ -58,7 +58,7 @@
     if (BD.runPasses(Prefix, PfxOutput))
       return KeepPrefix;
 
-    PrefixOutput.setFile(PfxOutput);
+    PrefixOutput.set(PfxOutput);
     OrigProgram = BD.Program;
 
     BD.Program = ParseInputFile(PrefixOutput.toString());
@@ -67,7 +67,7 @@
                 << PrefixOutput << "'!\n";
       exit(1);
     }
-    PrefixOutput.destroyFile();
+    PrefixOutput.destroy();
   }
 
   std::cout << "Checking to see if these passes crash: "


Index: llvm/tools/bugpoint/ExecutionDriver.cpp
diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.54 llvm/tools/bugpoint/ExecutionDriver.cpp:1.55
--- llvm/tools/bugpoint/ExecutionDriver.cpp:1.54	Thu Apr 21 18:59:23 2005
+++ llvm/tools/bugpoint/ExecutionDriver.cpp	Thu Jul  7 18:21:43 2005
@@ -281,7 +281,7 @@
     exit(1);
 
   // Remove the intermediate C file
-  OutputCFile.destroyFile();
+  OutputCFile.destroy();
 
   return "./" + SharedObjectFile;
 }
@@ -302,9 +302,9 @@
 
   // If we're checking the program exit code, assume anything nonzero is bad.
   if (CheckProgramExitCode && ProgramExitedNonzero) {
-    Output.destroyFile();
+    Output.destroy();
     if (RemoveBytecode)
-      sys::Path(BytecodeFile).destroyFile();
+      sys::Path(BytecodeFile).destroy();
     return true;
   }
 
@@ -321,10 +321,11 @@
   }
 
   // Remove the generated output.
-  Output.destroyFile();
+  Output.destroy();
 
   // Remove the bytecode file if we are supposed to.
-  if (RemoveBytecode) sys::Path(BytecodeFile).destroyFile();
+  if (RemoveBytecode) 
+    sys::Path(BytecodeFile).destroy();
   return FilesDifferent;
 }
 


Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.65 llvm/tools/bugpoint/Miscompilation.cpp:1.66
--- llvm/tools/bugpoint/Miscompilation.cpp:1.65	Sun May  8 16:54:56 2005
+++ llvm/tools/bugpoint/Miscompilation.cpp	Thu Jul  7 18:21:43 2005
@@ -99,7 +99,7 @@
   // If the prefix maintains the predicate by itself, only keep the prefix!
   if (BD.diffProgram(BytecodeResult)) {
     std::cout << " nope.\n";
-    sys::Path(BytecodeResult).destroyFile();
+    sys::Path(BytecodeResult).destroy();
     return KeepPrefix;
   }
   std::cout << " yup.\n";      // No miscompilation!
@@ -113,7 +113,7 @@
               << BytecodeResult << "'!\n";
     exit(1);
   }
-  sys::Path(BytecodeResult).destroyFile();  // No longer need the file on disk
+  sys::Path(BytecodeResult).destroy();  // No longer need the file on disk
 
   // Don't check if there are no passes in the suffix.
   if (Suffix.empty())
@@ -775,9 +775,9 @@
     std::cerr << ": still failing!\n";
   else
     std::cerr << ": didn't fail.\n";
-  TestModuleBC.destroyFile();
-  SafeModuleBC.destroyFile();
-  sys::Path(SharedObject).destroyFile();
+  TestModuleBC.destroy();
+  SafeModuleBC.destroy();
+  sys::Path(SharedObject).destroy();
 
   return Result;
 }


Index: llvm/tools/bugpoint/OptimizerDriver.cpp
diff -u llvm/tools/bugpoint/OptimizerDriver.cpp:1.31 llvm/tools/bugpoint/OptimizerDriver.cpp:1.32
--- llvm/tools/bugpoint/OptimizerDriver.cpp:1.31	Thu Apr 21 23:13:13 2005
+++ llvm/tools/bugpoint/OptimizerDriver.cpp	Thu Jul  7 18:21:43 2005
@@ -161,7 +161,7 @@
   // If we are supposed to delete the bytecode file or if the passes crashed,
   // remove it now.  This may fail if the file was never created, but that's ok.
   if (DeleteOutput || !ExitedOK)
-    sys::Path(OutputFilename).destroyFile();
+    sys::Path(OutputFilename).destroy();
 
 #ifndef PLATFORMINDEPENDENT
   if (!Quiet) {
@@ -214,6 +214,6 @@
               << BytecodeResult << "'!\n";
     exit(1);
   }
-  sys::Path(BytecodeResult).destroyFile();  // No longer need the file on disk
+  sys::Path(BytecodeResult).destroy();  // No longer need the file on disk
   return Ret;
 }






More information about the llvm-commits mailing list