[llvm-commits] [llvm] r118051 - in /llvm/trunk: lib/Linker/Linker.cpp lib/System/Path.cpp tools/llvm-ld/llvm-ld.cpp

Mikhail Glushenkov foldr at codedgers.com
Tue Nov 2 13:32:59 PDT 2010


Author: foldr
Date: Tue Nov  2 15:32:59 2010
New Revision: 118051

URL: http://llvm.org/viewvc/llvm-project?rev=118051&view=rev
Log:
GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.

This allows using GetDLLSuffix() with appendSuffix().

Modified:
    llvm/trunk/lib/Linker/Linker.cpp
    llvm/trunk/lib/System/Path.cpp
    llvm/trunk/tools/llvm-ld/llvm-ld.cpp

Modified: llvm/trunk/lib/Linker/Linker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/Linker.cpp?rev=118051&r1=118050&r2=118051&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/Linker.cpp (original)
+++ llvm/trunk/lib/Linker/Linker.cpp Tue Nov  2 15:32:59 2010
@@ -133,7 +133,7 @@
 
   // Try the libX.so (or .dylib) form
   FullPath.eraseSuffix();
-  FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
+  FullPath.appendSuffix(sys::Path::GetDLLSuffix());
   if (FullPath.isDynamicLibrary())  // Native shared library?
     return FullPath;
   if (FullPath.isBitcodeFile())    // .so file containing bitcode?

Modified: llvm/trunk/lib/System/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Path.cpp?rev=118051&r1=118050&r2=118051&view=diff
==============================================================================
--- llvm/trunk/lib/System/Path.cpp (original)
+++ llvm/trunk/lib/System/Path.cpp Tue Nov  2 15:32:59 2010
@@ -192,7 +192,7 @@
 }
 
 StringRef Path::GetDLLSuffix() {
-  return LTDL_SHLIB_EXT;
+  return &(LTDL_SHLIB_EXT[1]);
 }
 
 bool

Modified: llvm/trunk/tools/llvm-ld/llvm-ld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ld/llvm-ld.cpp?rev=118051&r1=118050&r2=118051&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ld/llvm-ld.cpp (original)
+++ llvm/trunk/tools/llvm-ld/llvm-ld.cpp Tue Nov  2 15:32:59 2010
@@ -455,7 +455,7 @@
            E = LibPaths.end(); P != E; ++P) {
       FullLibraryPath = *P;
       FullLibraryPath.appendComponent("lib" + *i);
-      FullLibraryPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
+      FullLibraryPath.appendSuffix(sys::Path::GetDLLSuffix());
       if (!FullLibraryPath.isEmpty()) {
         if (!FullLibraryPath.isDynamicLibrary()) {
           // Not a native shared library; mark as invalid





More information about the llvm-commits mailing list