diff options
-rw-r--r-- | llvm/lib/Linker/Linker.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/System/Path.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-ld/llvm-ld.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Linker/Linker.cpp b/llvm/lib/Linker/Linker.cpp index eb3fb6b1c2a..19ecaa3965d 100644 --- a/llvm/lib/Linker/Linker.cpp +++ b/llvm/lib/Linker/Linker.cpp @@ -133,7 +133,7 @@ static inline sys::Path IsLibrary(StringRef Name, // 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? diff --git a/llvm/lib/System/Path.cpp b/llvm/lib/System/Path.cpp index ae166a574d1..8fc4153acb1 100644 --- a/llvm/lib/System/Path.cpp +++ b/llvm/lib/System/Path.cpp @@ -192,7 +192,7 @@ Path::FindLibrary(std::string& name) { } StringRef Path::GetDLLSuffix() { - return LTDL_SHLIB_EXT; + return &(LTDL_SHLIB_EXT[1]); } bool diff --git a/llvm/tools/llvm-ld/llvm-ld.cpp b/llvm/tools/llvm-ld/llvm-ld.cpp index 9277554d5fa..a28592bd979 100644 --- a/llvm/tools/llvm-ld/llvm-ld.cpp +++ b/llvm/tools/llvm-ld/llvm-ld.cpp @@ -455,7 +455,7 @@ static void EmitShellScript(char **argv, Module *M) { 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 |