diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-23 11:37:21 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-23 11:37:21 +0000 |
commit | cfa6ec92e61a1ab040c2b79db5de3a39df732ff6 (patch) | |
tree | 3b2d0a185a206d9340c40ca55c8d65386ae7e07b /lib/VMCore | |
parent | 895ae9b30d4b652a41a0d0b8882d3a0fc4cadc13 (diff) | |
download | external_llvm-cfa6ec92e61a1ab040c2b79db5de3a39df732ff6.zip external_llvm-cfa6ec92e61a1ab040c2b79db5de3a39df732ff6.tar.gz external_llvm-cfa6ec92e61a1ab040c2b79db5de3a39df732ff6.tar.bz2 |
Kill off more cerr/cout uses and prune includes a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Attributes.cpp | 8 | ||||
-rw-r--r-- | lib/VMCore/LeakDetector.cpp | 5 | ||||
-rw-r--r-- | lib/VMCore/PassManager.cpp | 1 | ||||
-rw-r--r-- | lib/VMCore/TypeSymbolTable.cpp | 28 | ||||
-rw-r--r-- | lib/VMCore/Verifier.cpp | 5 |
5 files changed, 22 insertions, 25 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index fb1a9b8..51fd5f0 100644 --- a/lib/VMCore/Attributes.cpp +++ b/lib/VMCore/Attributes.cpp @@ -17,8 +17,8 @@ #include "llvm/ADT/FoldingSet.h" #include "llvm/System/Atomic.h" #include "llvm/System/Mutex.h" -#include "llvm/Support/Streams.h" #include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; //===----------------------------------------------------------------------===// @@ -316,11 +316,11 @@ AttrListPtr AttrListPtr::removeAttr(unsigned Idx, Attributes Attrs) const { } void AttrListPtr::dump() const { - cerr << "PAL[ "; + errs() << "PAL[ "; for (unsigned i = 0; i < getNumSlots(); ++i) { const AttributeWithIndex &PAWI = getSlot(i); - cerr << "{" << PAWI.Index << "," << PAWI.Attrs << "} "; + errs() << "{" << PAWI.Index << "," << PAWI.Attrs << "} "; } - cerr << "]\n"; + errs() << "]\n"; } diff --git a/lib/VMCore/LeakDetector.cpp b/lib/VMCore/LeakDetector.cpp index 3185742..5ebd4f5 100644 --- a/lib/VMCore/LeakDetector.cpp +++ b/lib/VMCore/LeakDetector.cpp @@ -16,7 +16,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/Streams.h" #include "llvm/System/Mutex.h" #include "llvm/System/Threading.h" #include "llvm/Value.h" @@ -64,8 +63,8 @@ void LeakDetector::checkForGarbageImpl(LLVMContext &Context, // use non-short-circuit version so that both checks are performed if (Objects->hasGarbage(Message) | pImpl->LLVMObjects.hasGarbage(Message)) - cerr << "\nThis is probably because you removed an object, but didn't " - << "delete it. Please check your code for memory leaks.\n"; + errs() << "\nThis is probably because you removed an object, but didn't " + << "delete it. Please check your code for memory leaks.\n"; // Clear out results so we don't get duplicate warnings on // next call... diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 8c42784..375151f 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -18,7 +18,6 @@ #include "llvm/Module.h" #include "llvm/ModuleProvider.h" #include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/Streams.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/raw_ostream.h" #include "llvm/System/Mutex.h" diff --git a/lib/VMCore/TypeSymbolTable.cpp b/lib/VMCore/TypeSymbolTable.cpp index 5fa8785..eba2e00 100644 --- a/lib/VMCore/TypeSymbolTable.cpp +++ b/lib/VMCore/TypeSymbolTable.cpp @@ -16,7 +16,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/System/RWMutex.h" #include "llvm/System/Threading.h" #include <algorithm> @@ -79,7 +79,7 @@ Type* TypeSymbolTable::remove(iterator Entry) { #if DEBUG_SYMBOL_TABLE dump(); - cerr << " Removing Value: " << Result->getName() << "\n"; + errs() << " Removing Value: " << Result->getName() << "\n"; #endif tmap.erase(Entry); @@ -90,9 +90,9 @@ Type* TypeSymbolTable::remove(iterator Entry) { // list... if (Result->isAbstract()) { #if DEBUG_ABSTYPE - cerr << "Removing abstract type from symtab" - << Result->getDescription() - << "\n"; + errs() << "Removing abstract type from symtab" + << Result->getDescription() + << "\n"; #endif cast<DerivedType>(Result)->removeAbstractTypeUser(this); } @@ -112,7 +112,7 @@ void TypeSymbolTable::insert(const StringRef &Name, const Type* T) { #if DEBUG_SYMBOL_TABLE dump(); - cerr << " Inserted type: " << Name << ": " << T->getDescription() << "\n"; + errs() << " Inserted type: " << Name << ": " << T->getDescription() << "\n"; #endif } else { // If there is a name conflict... @@ -124,8 +124,8 @@ void TypeSymbolTable::insert(const StringRef &Name, const Type* T) { #if DEBUG_SYMBOL_TABLE dump(); - cerr << " Inserting type: " << UniqueName << ": " - << T->getDescription() << "\n"; + errs() << " Inserting type: " << UniqueName << ": " + << T->getDescription() << "\n"; #endif // Insert the tmap entry @@ -138,7 +138,7 @@ void TypeSymbolTable::insert(const StringRef &Name, const Type* T) { if (T->isAbstract()) { cast<DerivedType>(T)->addAbstractTypeUser(this); #if DEBUG_ABSTYPE - cerr << "Added abstract type to ST: " << T->getDescription() << "\n"; + errs() << "Added abstract type to ST: " << T->getDescription() << "\n"; #endif } } @@ -156,14 +156,14 @@ void TypeSymbolTable::refineAbstractType(const DerivedType *OldType, for (iterator I = begin(), E = end(); I != E; ++I) { if (I->second == (Type*)OldType) { // FIXME when Types aren't const. #if DEBUG_ABSTYPE - cerr << "Removing type " << OldType->getDescription() << "\n"; + errs() << "Removing type " << OldType->getDescription() << "\n"; #endif OldType->removeAbstractTypeUser(this); I->second = (Type*)NewType; // TODO FIXME when types aren't const if (NewType->isAbstract()) { #if DEBUG_ABSTYPE - cerr << "Added type " << NewType->getDescription() << "\n"; + errs() << "Added type " << NewType->getDescription() << "\n"; #endif cast<DerivedType>(NewType)->addAbstractTypeUser(this); } @@ -184,13 +184,13 @@ void TypeSymbolTable::typeBecameConcrete(const DerivedType *AbsTy) { } static void DumpTypes(const std::pair<const std::string, const Type*>& T ) { - cerr << " '" << T.first << "' = "; + errs() << " '" << T.first << "' = "; T.second->dump(); - cerr << "\n"; + errs() << "\n"; } void TypeSymbolTable::dump() const { - cerr << "TypeSymbolPlane: "; + errs() << "TypeSymbolPlane: "; sys::SmartScopedReader<true> Reader(*TypeSymbolTableLock); for_each(tmap.begin(), tmap.end(), DumpTypes); } diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index ddea84d..eed4e2d 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -56,7 +56,6 @@ #include "llvm/Support/CallSite.h" #include "llvm/Support/CFG.h" #include "llvm/Support/InstVisitor.h" -#include "llvm/Support/Streams.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" @@ -85,9 +84,9 @@ namespace { // Anonymous namespace for class for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) { if (I->empty() || !I->back().isTerminator()) { - cerr << "Basic Block does not have terminator!\n"; + errs() << "Basic Block does not have terminator!\n"; WriteAsOperand(errs(), I, true); - cerr << "\n"; + errs() << "\n"; Broken = true; } } |