GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.

This allows using GetDLLSuffix() with appendSuffix().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov
2010-11-02 20:32:59 +00:00
parent 572ec1f3c0
commit c8aef4b2ea
3 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ static inline sys::Path IsLibrary(StringRef Name,
// Try the libX.so (or .dylib) form // Try the libX.so (or .dylib) form
FullPath.eraseSuffix(); FullPath.eraseSuffix();
FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1])); FullPath.appendSuffix(sys::Path::GetDLLSuffix());
if (FullPath.isDynamicLibrary()) // Native shared library? if (FullPath.isDynamicLibrary()) // Native shared library?
return FullPath; return FullPath;
if (FullPath.isBitcodeFile()) // .so file containing bitcode? if (FullPath.isBitcodeFile()) // .so file containing bitcode?

View File

@ -192,7 +192,7 @@ Path::FindLibrary(std::string& name) {
} }
StringRef Path::GetDLLSuffix() { StringRef Path::GetDLLSuffix() {
return LTDL_SHLIB_EXT; return &(LTDL_SHLIB_EXT[1]);
} }
bool bool

View File

@ -455,7 +455,7 @@ static void EmitShellScript(char **argv, Module *M) {
E = LibPaths.end(); P != E; ++P) { E = LibPaths.end(); P != E; ++P) {
FullLibraryPath = *P; FullLibraryPath = *P;
FullLibraryPath.appendComponent("lib" + *i); FullLibraryPath.appendComponent("lib" + *i);
FullLibraryPath.appendSuffix(&(LTDL_SHLIB_EXT[1])); FullLibraryPath.appendSuffix(sys::Path::GetDLLSuffix());
if (!FullLibraryPath.isEmpty()) { if (!FullLibraryPath.isEmpty()) {
if (!FullLibraryPath.isDynamicLibrary()) { if (!FullLibraryPath.isDynamicLibrary()) {
// Not a native shared library; mark as invalid // Not a native shared library; mark as invalid