From 8a6411ca14e6216192ccddb18c5196a26e98e1b3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Aug 2009 04:37:46 +0000 Subject: eliminate the "Value" printing methods that print to a std::ostream. This required converting a bunch of stuff off DOUT and other cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79819 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'lib/Linker') diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index ca0bf73..effba47 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -25,7 +25,6 @@ #include "llvm/ValueSymbolTable.h" #include "llvm/Instructions.h" #include "llvm/Assembly/Writer.h" -#include "llvm/Support/Streams.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/System/Path.h" #include "llvm/ADT/DenseMap.h" @@ -145,7 +144,7 @@ protected: // for debugging... virtual void dump() const { - cerr << "AbstractTypeSet!\n"; + errs() << "AbstractTypeSet!\n"; } }; } @@ -338,11 +337,11 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) { static void PrintMap(const std::map &M) { for (std::map::const_iterator I = M.begin(), E =M.end(); I != E; ++I) { - cerr << " Fr: " << (void*)I->first << " "; + errs() << " Fr: " << (void*)I->first << " "; I->first->dump(); - cerr << " To: " << (void*)I->second << " "; + errs() << " To: " << (void*)I->second << " "; I->second->dump(); - cerr << "\n"; + errs() << "\n"; } } #endif @@ -414,10 +413,10 @@ static Value *RemapOperand(const Value *In, } #ifndef NDEBUG - cerr << "LinkModules ValueMap: \n"; + errs() << "LinkModules ValueMap: \n"; PrintMap(ValueMap); - cerr << "Couldn't remap value: " << (void*)In << " " << *In << "\n"; + errs() << "Couldn't remap value: " << (void*)In << " " << *In << "\n"; llvm_unreachable("Couldn't remap value!"); #endif return 0; @@ -1280,10 +1279,10 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) { if (!Src->getDataLayout().empty() && !Dest->getDataLayout().empty() && Src->getDataLayout() != Dest->getDataLayout()) - cerr << "WARNING: Linking two modules of different data layouts!\n"; + errs() << "WARNING: Linking two modules of different data layouts!\n"; if (!Src->getTargetTriple().empty() && Dest->getTargetTriple() != Src->getTargetTriple()) - cerr << "WARNING: Linking two modules of different target triples!\n"; + errs() << "WARNING: Linking two modules of different target triples!\n"; // Append the module inline asm string. if (!Src->getModuleInlineAsm().empty()) { -- cgit v1.1