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

Reid Spencer reid at x10sys.com
Thu Jul 7 20:09:13 PDT 2005



Changes in directory llvm/tools/bugpoint:

CrashDebugger.cpp updated: 1.43 -> 1.44
ExecutionDriver.cpp updated: 1.55 -> 1.56
Miscompilation.cpp updated: 1.66 -> 1.67
OptimizerDriver.cpp updated: 1.32 -> 1.33
---
Log message:

Final Changes For PR495: http://llvm.cs.uiuc.edu/PR495 :

This chagne just renames some sys::Path methods to ensure they are not 
misused. The Path documentation now divides methods into two dimensions: 
Path/Disk and accessor/mutator. Path accessors and mutators only operate 
on the Path object itself without making any disk accesses. Disk accessors 
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.



---
Diffs of the changes:  (+13 -13)

 CrashDebugger.cpp   |    2 +-
 ExecutionDriver.cpp |   10 +++++-----
 Miscompilation.cpp  |   10 +++++-----
 OptimizerDriver.cpp |    4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)


Index: llvm/tools/bugpoint/CrashDebugger.cpp
diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.43 llvm/tools/bugpoint/CrashDebugger.cpp:1.44
--- llvm/tools/bugpoint/CrashDebugger.cpp:1.43	Thu Jul  7 18:21:43 2005
+++ llvm/tools/bugpoint/CrashDebugger.cpp	Thu Jul  7 22:08:58 2005
@@ -67,7 +67,7 @@
                 << PrefixOutput << "'!\n";
       exit(1);
     }
-    PrefixOutput.destroy();
+    PrefixOutput.eraseFromDisk();
   }
 
   std::cout << "Checking to see if these passes crash: "


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


Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.66 llvm/tools/bugpoint/Miscompilation.cpp:1.67
--- llvm/tools/bugpoint/Miscompilation.cpp:1.66	Thu Jul  7 18:21:43 2005
+++ llvm/tools/bugpoint/Miscompilation.cpp	Thu Jul  7 22:08:58 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).destroy();
+    sys::Path(BytecodeResult).eraseFromDisk();
     return KeepPrefix;
   }
   std::cout << " yup.\n";      // No miscompilation!
@@ -113,7 +113,7 @@
               << BytecodeResult << "'!\n";
     exit(1);
   }
-  sys::Path(BytecodeResult).destroy();  // No longer need the file on disk
+  sys::Path(BytecodeResult).eraseFromDisk();  // 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.destroy();
-  SafeModuleBC.destroy();
-  sys::Path(SharedObject).destroy();
+  TestModuleBC.eraseFromDisk();
+  SafeModuleBC.eraseFromDisk();
+  sys::Path(SharedObject).eraseFromDisk();
 
   return Result;
 }


Index: llvm/tools/bugpoint/OptimizerDriver.cpp
diff -u llvm/tools/bugpoint/OptimizerDriver.cpp:1.32 llvm/tools/bugpoint/OptimizerDriver.cpp:1.33
--- llvm/tools/bugpoint/OptimizerDriver.cpp:1.32	Thu Jul  7 18:21:43 2005
+++ llvm/tools/bugpoint/OptimizerDriver.cpp	Thu Jul  7 22:08:58 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).destroy();
+    sys::Path(OutputFilename).eraseFromDisk();
 
 #ifndef PLATFORMINDEPENDENT
   if (!Quiet) {
@@ -214,6 +214,6 @@
               << BytecodeResult << "'!\n";
     exit(1);
   }
-  sys::Path(BytecodeResult).destroy();  // No longer need the file on disk
+  sys::Path(BytecodeResult).eraseFromDisk();  // No longer need the file on disk
   return Ret;
 }






More information about the llvm-commits mailing list