Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis
[oota-llvm.git] / lib / Linker / Linker.cpp
index 3d24804fbd0e4e43c3fd30a2d82897563b7f584b..19ecaa3965d402bab91c847b1701110aab45a682 100644 (file)
@@ -15,7 +15,6 @@
 #include "llvm/Module.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/System/Path.h"
-#include "llvm/Support/Debug.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Config/config.h"
@@ -61,7 +60,7 @@ Linker::warning(StringRef message) {
 void
 Linker::verbose(StringRef message) {
   if (Flags&Verbose)
-    dbgs() << "  " << message << "\n";
+    errs() << "  " << message << "\n";
 }
 
 void
@@ -98,13 +97,13 @@ std::auto_ptr<Module>
 Linker::LoadObject(const sys::Path &FN) {
   std::string ParseErrorMessage;
   Module *Result = 0;
-  
+
   std::auto_ptr<MemoryBuffer> Buffer(MemoryBuffer::getFileOrSTDIN(FN.c_str()));
   if (Buffer.get())
     Result = ParseBitcodeFile(Buffer.get(), Context, &ParseErrorMessage);
   else
     ParseErrorMessage = "Error reading file '" + FN.str() + "'";
-    
+
   if (Result)
     return std::auto_ptr<Module>(Result);
   Error = "Bitcode file '" + FN.str() + "' could not be loaded";
@@ -134,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?