summaryrefslogtreecommitdiff
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 04:44:11 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 04:44:11 +0000
commit569f121f4ecc53f8ab505c4ccb6e1e77c78e188d (patch)
treeccaec7707f4eaaa3f2c7863efcf9ecad86b9a87b /lib/VMCore
parent05e9d99767ea02d516bf4fe9c457622b2530e077 (diff)
downloadllvm-569f121f4ecc53f8ab505c4ccb6e1e77c78e188d.tar.gz
llvm-569f121f4ecc53f8ab505c4ccb6e1e77c78e188d.tar.bz2
llvm-569f121f4ecc53f8ab505c4ccb6e1e77c78e188d.tar.xz
remove some DOUTs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/ConstantsContext.h3
-rw-r--r--lib/VMCore/Type.cpp38
-rw-r--r--lib/VMCore/TypesContext.h10
-rw-r--r--lib/VMCore/ValueSymbolTable.cpp16
4 files changed, 34 insertions, 33 deletions
diff --git a/lib/VMCore/ConstantsContext.h b/lib/VMCore/ConstantsContext.h
index 3ace92efd8..22aba7e1d3 100644
--- a/lib/VMCore/ConstantsContext.h
+++ b/lib/VMCore/ConstantsContext.h
@@ -20,6 +20,7 @@
#include "llvm/Operator.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Mutex.h"
#include "llvm/System/RWMutex.h"
#include <map>
@@ -773,7 +774,7 @@ public:
}
void dump() const {
- DOUT << "Constant.cpp: ValueMap\n";
+ DEBUG(errs() << "Constant.cpp: ValueMap\n");
}
};
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 8aaee5433d..3f64e81f92 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -467,7 +467,7 @@ PointerType::PointerType(const Type *E, unsigned AddrSpace)
OpaqueType::OpaqueType(LLVMContext &C) : DerivedType(C, OpaqueTyID) {
setAbstract(true);
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *this << "\n";
+ DEBUG(errs() << "Derived new type: " << *this << "\n");
#endif
}
@@ -756,7 +756,7 @@ const IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) {
pImpl->IntegerTypes.add(IVT, ITy);
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *ITy << "\n";
+ DEBUG(errs() << "Derived new type: " << *ITy << "\n");
#endif
return ITy;
}
@@ -800,7 +800,7 @@ FunctionType *FunctionType::get(const Type *ReturnType,
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << FT << "\n";
+ DEBUG(errs() << "Derived new type: " << FT << "\n");
#endif
return FT;
}
@@ -822,7 +822,7 @@ ArrayType *ArrayType::get(const Type *ElementType, uint64_t NumElements) {
pImpl->ArrayTypes.add(AVT, AT = new ArrayType(ElementType, NumElements));
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *AT << "\n";
+ DEBUG(errs() << "Derived new type: " << *AT << "\n");
#endif
return AT;
}
@@ -855,7 +855,7 @@ VectorType *VectorType::get(const Type *ElementType, unsigned NumElements) {
pImpl->VectorTypes.add(PVT, PT = new VectorType(ElementType, NumElements));
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *PT << "\n";
+ DEBUG(errs() << "Derived new type: " << *PT << "\n");
#endif
return PT;
}
@@ -891,7 +891,7 @@ StructType *StructType::get(LLVMContext &Context,
pImpl->StructTypes.add(STV, ST);
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *ST << "\n";
+ DEBUG(errs() << "Derived new type: " << *ST << "\n");
#endif
return ST;
}
@@ -944,7 +944,7 @@ PointerType *PointerType::get(const Type *ValueType, unsigned AddressSpace) {
pImpl->PointerTypes.add(PVT, PT = new PointerType(ValueType, AddressSpace));
}
#ifdef DEBUG_MERGE_TYPES
- DOUT << "Derived new type: " << *PT << "\n";
+ DEBUG(errs() << "Derived new type: " << *PT << "\n");
#endif
return PT;
}
@@ -1004,14 +1004,14 @@ void Type::removeAbstractTypeUser(AbstractTypeUser *U) const {
AbstractTypeUsers.erase(AbstractTypeUsers.begin()+i);
#ifdef DEBUG_MERGE_TYPES
- DOUT << " remAbstractTypeUser[" << (void*)this << ", "
- << *this << "][" << i << "] User = " << U << "\n";
+ DEBUG(errs() << " remAbstractTypeUser[" << (void*)this << ", "
+ << *this << "][" << i << "] User = " << U << "\n");
#endif
if (AbstractTypeUsers.empty() && getRefCount() == 0 && isAbstract()) {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "DELETEing unused abstract type: <" << *this
- << ">[" << (void*)this << "]" << "\n";
+ DEBUG(errs() << "DELETEing unused abstract type: <" << *this
+ << ">[" << (void*)this << "]" << "\n");
#endif
this->destroy();
@@ -1037,9 +1037,9 @@ void DerivedType::unlockedRefineAbstractTypeTo(const Type *NewType) {
pImpl->AbstractTypeDescriptions.clear();
#ifdef DEBUG_MERGE_TYPES
- DOUT << "REFINING abstract type [" << (void*)this << " "
- << *this << "] to [" << (void*)NewType << " "
- << *NewType << "]!\n";
+ DEBUG(errs() << "REFINING abstract type [" << (void*)this << " "
+ << *this << "] to [" << (void*)NewType << " "
+ << *NewType << "]!\n");
#endif
// Make sure to put the type to be refined to into a holder so that if IT gets
@@ -1075,10 +1075,10 @@ void DerivedType::unlockedRefineAbstractTypeTo(const Type *NewType) {
unsigned OldSize = AbstractTypeUsers.size(); OldSize=OldSize;
#ifdef DEBUG_MERGE_TYPES
- DOUT << " REFINING user " << OldSize-1 << "[" << (void*)User
- << "] of abstract type [" << (void*)this << " "
- << *this << "] to [" << (void*)NewTy.get() << " "
- << *NewTy << "]!\n";
+ DEBUG(errs() << " REFINING user " << OldSize-1 << "[" << (void*)User
+ << "] of abstract type [" << (void*)this << " "
+ << *this << "] to [" << (void*)NewTy.get() << " "
+ << *NewTy << "]!\n");
#endif
User->refineAbstractType(this, NewTy);
@@ -1108,7 +1108,7 @@ void DerivedType::refineAbstractTypeTo(const Type *NewType) {
//
void DerivedType::notifyUsesThatTypeBecameConcrete() {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "typeIsREFINED type: " << (void*)this << " " << *this << "\n";
+ DEBUG(errs() << "typeIsREFINED type: " << (void*)this << " " << *this <<"\n");
#endif
LLVMContextImpl *pImpl = getContext().pImpl;
diff --git a/lib/VMCore/TypesContext.h b/lib/VMCore/TypesContext.h
index 8e2487901f..2a287fe5df 100644
--- a/lib/VMCore/TypesContext.h
+++ b/lib/VMCore/TypesContext.h
@@ -304,8 +304,8 @@ public:
void RefineAbstractType(TypeClass *Ty, const DerivedType *OldType,
const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "RefineAbstractType(" << (void*)OldType << "[" << *OldType
- << "], " << (void*)NewType << " [" << *NewType << "])\n";
+ DEBUG(errs() << "RefineAbstractType(" << (void*)OldType << "[" << *OldType
+ << "], " << (void*)NewType << " [" << *NewType << "])\n");
#endif
// Otherwise, we are changing one subelement type into another. Clearly the
@@ -410,12 +410,12 @@ public:
void print(const char *Arg) const {
#ifdef DEBUG_MERGE_TYPES
- DOUT << "TypeMap<>::" << Arg << " table contents:\n";
+ DEBUG(errs() << "TypeMap<>::" << Arg << " table contents:\n");
unsigned i = 0;
for (typename std::map<ValType, PATypeHolder>::const_iterator I
= Map.begin(), E = Map.end(); I != E; ++I)
- DOUT << " " << (++i) << ". " << (void*)I->second.get() << " "
- << *I->second.get() << "\n";
+ DEBUG(errs() << " " << (++i) << ". " << (void*)I->second.get() << " "
+ << *I->second.get() << "\n");
#endif
}
diff --git a/lib/VMCore/ValueSymbolTable.cpp b/lib/VMCore/ValueSymbolTable.cpp
index 8579ad98c1..7765a98c1f 100644
--- a/lib/VMCore/ValueSymbolTable.cpp
+++ b/lib/VMCore/ValueSymbolTable.cpp
@@ -38,7 +38,7 @@ void ValueSymbolTable::reinsertValue(Value* V) {
// Try inserting the name, assuming it won't conflict.
if (vmap.insert(V->Name)) {
- //DOUT << " Inserted value: " << V->Name << ": " << *V << "\n";
+ //DEBUG(errs() << " Inserted value: " << V->Name << ": " << *V << "\n");
return;
}
@@ -62,14 +62,14 @@ void ValueSymbolTable::reinsertValue(Value* V) {
// Newly inserted name. Success!
NewName.setValue(V);
V->Name = &NewName;
- //DEBUG(DOUT << " Inserted value: " << UniqueName << ": " << *V << "\n");
+ //DEBUG(errs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
return;
}
}
}
void ValueSymbolTable::removeValueName(ValueName *V) {
- //DEBUG(DOUT << " Removing Value: " << V->getKeyData() << "\n");
+ //DEBUG(errs() << " Removing Value: " << V->getKeyData() << "\n");
// Remove the value from the symbol table.
vmap.remove(V);
}
@@ -82,7 +82,7 @@ ValueName *ValueSymbolTable::createValueName(const StringRef &Name, Value *V) {
ValueName &Entry = vmap.GetOrCreateValue(Name);
if (Entry.getValue() == 0) {
Entry.setValue(V);
- //DEBUG(DOUT << " Inserted value: " << Entry.getKeyData() << ": "
+ //DEBUG(errs() << " Inserted value: " << Entry.getKeyData() << ": "
// << *V << "\n");
return &Entry;
}
@@ -102,7 +102,7 @@ ValueName *ValueSymbolTable::createValueName(const StringRef &Name, Value *V) {
if (NewName.getValue() == 0) {
// Newly inserted name. Success!
NewName.setValue(V);
- //DEBUG(DOUT << " Inserted value: " << UniqueName << ": " << *V << "\n");
+ //DEBUG(errs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
return &NewName;
}
}
@@ -112,10 +112,10 @@ ValueName *ValueSymbolTable::createValueName(const StringRef &Name, Value *V) {
// dump - print out the symbol table
//
void ValueSymbolTable::dump() const {
- //DOUT << "ValueSymbolTable:\n";
+ //DEBUG(errs() << "ValueSymbolTable:\n");
for (const_iterator I = begin(), E = end(); I != E; ++I) {
- //DOUT << " '" << I->getKeyData() << "' = ";
+ //DEBUG(errs() << " '" << I->getKeyData() << "' = ");
I->getValue()->dump();
- //DOUT << "\n";
+ //DEBUG(errs() << "\n");
}
}