[llvm-commits] CVS: llvm/lib/Support/SystemUtils.cpp ToolRunner.cpp

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



Changes in directory llvm/lib/Support:

SystemUtils.cpp updated: 1.44 -> 1.45
ToolRunner.cpp updated: 1.42 -> 1.43
---
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:  (+5 -5)

 SystemUtils.cpp |    4 ++--
 ToolRunner.cpp  |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.44 llvm/lib/Support/SystemUtils.cpp:1.45
--- llvm/lib/Support/SystemUtils.cpp:1.44	Thu Jul  7 13:21:42 2005
+++ llvm/lib/Support/SystemUtils.cpp	Thu Jul  7 18:21:43 2005
@@ -45,9 +45,9 @@
   // if ProgramPath contains at least one / character, indicating that it is a
   // relative path to bugpoint itself.
   sys::Path Result ( ProgramPath );
-  Result.elideFile();
+  Result.eraseComponent();
   if (!Result.isEmpty()) {
-    Result.appendFile(ExeName);
+    Result.appendComponent(ExeName);
     if (Result.canExecute())
       return Result;
   }


Index: llvm/lib/Support/ToolRunner.cpp
diff -u llvm/lib/Support/ToolRunner.cpp:1.42 llvm/lib/Support/ToolRunner.cpp:1.43
--- llvm/lib/Support/ToolRunner.cpp:1.42	Thu Apr 21 17:52:05 2005
+++ llvm/lib/Support/ToolRunner.cpp	Thu Jul  7 18:21:43 2005
@@ -65,7 +65,7 @@
     ErrorFile.close();
   }
 
-  ErrorFilename.destroyFile();
+  ErrorFilename.destroy();
   throw ToolExecutionError(OS.str());
 }
 
@@ -176,7 +176,7 @@
 void LLC::compileProgram(const std::string &Bytecode) {
   sys::Path OutputAsmFile;
   OutputAsm(Bytecode, OutputAsmFile);
-  OutputAsmFile.destroyFile();
+  OutputAsmFile.destroy();
 }
 
 int LLC::ExecuteProgram(const std::string &Bytecode,
@@ -321,7 +321,7 @@
 void CBE::compileProgram(const std::string &Bytecode) {
   sys::Path OutputCFile;
   OutputC(Bytecode, OutputCFile);
-  OutputCFile.destroyFile();
+  OutputCFile.destroy();
 }
 
 int CBE::ExecuteProgram(const std::string &Bytecode,






More information about the llvm-commits mailing list