[llvm-commits] CVS: llvm/lib/System/Path.cpp

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



Changes in directory llvm/lib/System:

Path.cpp updated: 1.18 -> 1.19
---
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:  (+3 -3)

 Path.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/System/Path.cpp
diff -u llvm/lib/System/Path.cpp:1.18 llvm/lib/System/Path.cpp:1.19
--- llvm/lib/System/Path.cpp:1.18	Thu Jul  7 13:21:42 2005
+++ llvm/lib/System/Path.cpp	Thu Jul  7 18:21:43 2005
@@ -27,7 +27,7 @@
 Path::GetLLVMConfigDir() {
   Path result;
 #ifdef LLVM_ETCDIR
-  if (result.setDirectory(LLVM_ETCDIR))
+  if (result.set(LLVM_ETCDIR))
     return result;
 #endif
   return GetLLVMDefaultConfigDir();
@@ -80,10 +80,10 @@
   GetSystemLibraryPaths(LibPaths);
   for (unsigned i = 0; i < LibPaths.size(); ++i) {
     sys::Path FullPath(LibPaths[i]);
-    FullPath.appendFile("lib" + name + LTDL_SHLIB_EXT);
+    FullPath.appendComponent("lib" + name + LTDL_SHLIB_EXT);
     if (FullPath.isDynamicLibrary())
       return FullPath;
-    FullPath.elideSuffix();
+    FullPath.eraseSuffix();
     FullPath.appendSuffix("a");
     if (FullPath.isArchive())
       return FullPath;






More information about the llvm-commits mailing list