Revert version 1.39. It breaks the ordering of the library processing.
[oota-llvm.git] / lib / Linker / LinkArchives.cpp
index d15afaf85d6791fa6f8a53063625a7edcadcb622..af17ff31b884f3fdb6dc09e08c04a7694d5885f4 100644 (file)
@@ -60,8 +60,8 @@ std::string llvm::FindLib(const std::string &Filename,
     if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".bc"))
       return Directory + LibName + ".bc";
 
-    if (FileOpenable(Directory + LibName + SHLIBEXT))
-      return Directory + LibName + SHLIBEXT;
+    if (FileOpenable(Directory + LibName + LTDL_SHLIB_EXT))
+      return Directory + LibName + LTDL_SHLIB_EXT;
 
     if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".a"))
       return Directory + LibName + ".a";
@@ -208,7 +208,7 @@ bool llvm::LinkInArchive(Module *M,
     // findModulesDefiningSymbols are ones that the archive does not define. So
     // we add them to the NotDefinedByArchive variable now.
     NotDefinedByArchive.insert(UndefinedSymbols.begin(),
-        UndefinedSymbols.end());;
+        UndefinedSymbols.end());
 
     // Loop over all the ModuleProviders that we got back from the archive
     for (std::set<ModuleProvider*>::iterator I=Modules.begin(), E=Modules.end();