Remove needless usage of getDescription()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-09-04 23:46:03 +00:00
parent e09a128df0
commit a5112c768d

View File

@ -377,7 +377,7 @@ PointerType::PointerType(const Type *E) : SequentialType(PointerTyID, E) {
OpaqueType::OpaqueType() : DerivedType(OpaqueTyID) { OpaqueType::OpaqueType() : DerivedType(OpaqueTyID) {
setAbstract(true); setAbstract(true);
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "Derived new type: " << getDescription() << "\n"; std::cerr << "Derived new type: " << *this << "\n";
#endif #endif
} }
@ -515,8 +515,8 @@ public:
virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy) { virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "Removing Old type from Tab: " << (void*)OldTy << ", " std::cerr << "Removing Old type from Tab: " << (void*)OldTy << ", "
<< OldTy->getDescription() << " replacement == " << (void*)NewTy << *OldTy << " replacement == " << (void*)NewTy
<< ", " << NewTy->getDescription() << "\n"; << ", " << *NewTy << "\n";
#endif #endif
for (typename MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I) for (typename MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I)
if (I->second == OldTy) { if (I->second == OldTy) {
@ -539,7 +539,7 @@ public:
unsigned i = 0; unsigned i = 0;
for (MapTy::const_iterator I = Map.begin(), E = Map.end(); I != E; ++I) for (MapTy::const_iterator I = Map.begin(), E = Map.end(); I != E; ++I)
std::cerr << " " << (++i) << ". " << I->second << " " std::cerr << " " << (++i) << ". " << I->second << " "
<< I->second->getDescription() << "\n"; << *I->second << "\n";
#endif #endif
} }
@ -712,7 +712,7 @@ ArrayType *ArrayType::get(const Type *ElementType, unsigned NumElements) {
ArrayTypes.add(AVT, AT = new ArrayType(ElementType, NumElements)); ArrayTypes.add(AVT, AT = new ArrayType(ElementType, NumElements));
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "Derived new type: " << AT->getDescription() << "\n"; std::cerr << "Derived new type: " << *AT << "\n";
#endif #endif
return AT; return AT;
} }
@ -772,7 +772,7 @@ StructType *StructType::get(const std::vector<const Type*> &ETypes) {
StructTypes.add(STV, ST = new StructType(ETypes)); StructTypes.add(STV, ST = new StructType(ETypes));
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "Derived new type: " << ST->getDescription() << "\n"; std::cerr << "Derived new type: " << *ST << "\n";
#endif #endif
return ST; return ST;
} }
@ -825,7 +825,7 @@ PointerType *PointerType::get(const Type *ValueType) {
PointerTypes.add(PVT, PT = new PointerType(ValueType)); PointerTypes.add(PVT, PT = new PointerType(ValueType));
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "Derived new type: " << PT->getDescription() << "\n"; std::cerr << "Derived new type: " << *PT << "\n";
#endif #endif
return PT; return PT;
} }
@ -850,7 +850,7 @@ void DerivedType::addAbstractTypeUser(AbstractTypeUser *U) const {
#if DEBUG_MERGE_TYPES #if DEBUG_MERGE_TYPES
std::cerr << " addAbstractTypeUser[" << (void*)this << ", " std::cerr << " addAbstractTypeUser[" << (void*)this << ", "
<< getDescription() << "][" << AbstractTypeUsers.size() << *this << "][" << AbstractTypeUsers.size()
<< "] User = " << U << "\n"; << "] User = " << U << "\n";
#endif #endif
AbstractTypeUsers.push_back(U); AbstractTypeUsers.push_back(U);
@ -878,12 +878,12 @@ void DerivedType::removeAbstractTypeUser(AbstractTypeUser *U) const {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << " remAbstractTypeUser[" << (void*)this << ", " std::cerr << " remAbstractTypeUser[" << (void*)this << ", "
<< getDescription() << "][" << i << "] User = " << U << "\n"; << *this << "][" << i << "] User = " << U << "\n";
#endif #endif
if (AbstractTypeUsers.empty() && isAbstract()) { if (AbstractTypeUsers.empty() && isAbstract()) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "DELETEing unused abstract type: <" << getDescription() std::cerr << "DELETEing unused abstract type: <" << *this
<< ">[" << (void*)this << "]" << "\n"; << ">[" << (void*)this << "]" << "\n";
#endif #endif
delete this; // No users of this abstract type! delete this; // No users of this abstract type!
@ -905,8 +905,8 @@ void DerivedType::refineAbstractTypeTo(const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "REFINING abstract type [" << (void*)this << " " std::cerr << "REFINING abstract type [" << (void*)this << " "
<< getDescription() << "] to [" << (void*)NewType << " " << *this << "] to [" << (void*)NewType << " "
<< NewType->getDescription() << "]!\n"; << *NewType << "]!\n";
#endif #endif
@ -944,8 +944,8 @@ void DerivedType::refineAbstractTypeTo(const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << " REFINING user " << OldSize-1 << "[" << (void*)User std::cerr << " REFINING user " << OldSize-1 << "[" << (void*)User
<< "] of abstract type [" << (void*)this << " " << "] of abstract type [" << (void*)this << " "
<< getDescription() << "] to [" << (void*)NewTy.get() << " " << *this << "] to [" << (void*)NewTy.get() << " "
<< NewTy->getDescription() << "]!\n"; << *NewTy << "]!\n";
#endif #endif
User->refineAbstractType(this, NewTy); User->refineAbstractType(this, NewTy);
@ -985,8 +985,7 @@ void DerivedType::typeIsRefined() {
++isRefining; ++isRefining;
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "typeIsREFINED type: " << (void*)this <<" "<<getDescription() std::cerr << "typeIsREFINED type: " << (void*)this << " " << *this << "\n";
<< "\n";
#endif #endif
// In this loop we have to be very careful not to get into infinite loops and // In this loop we have to be very careful not to get into infinite loops and
@ -1018,7 +1017,7 @@ void DerivedType::typeIsRefined() {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << " typeIsREFINED user " << i << "[" << ATU std::cerr << " typeIsREFINED user " << i << "[" << ATU
<< "] of abstract type [" << (void*)this << " " << "] of abstract type [" << (void*)this << " "
<< getDescription() << "]\n"; << *this << "]\n";
#endif #endif
ATU->refineAbstractType(this, this); ATU->refineAbstractType(this, this);
} }
@ -1052,8 +1051,8 @@ void FunctionType::refineAbstractType(const DerivedType *OldType,
const Type *NewType) { const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "FunctionTy::refineAbstractTy(" << (void*)OldType << "[" std::cerr << "FunctionTy::refineAbstractTy(" << (void*)OldType << "["
<< OldType->getDescription() << "], " << (void*)NewType << " [" << *OldType << "], " << (void*)NewType << " ["
<< NewType->getDescription() << "])\n"; << *NewType << "])\n";
#endif #endif
// Find the type element we are refining... // Find the type element we are refining...
if (ResultType == OldType) { if (ResultType == OldType) {
@ -1086,8 +1085,8 @@ void ArrayType::refineAbstractType(const DerivedType *OldType,
const Type *NewType) { const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "ArrayTy::refineAbstractTy(" << (void*)OldType << "[" std::cerr << "ArrayTy::refineAbstractTy(" << (void*)OldType << "["
<< OldType->getDescription() << "], " << (void*)NewType << " [" << *OldType << "], " << (void*)NewType << " ["
<< NewType->getDescription() << "])\n"; << *NewType << "])\n";
#endif #endif
assert(getElementType() == OldType); assert(getElementType() == OldType);
@ -1114,8 +1113,8 @@ void StructType::refineAbstractType(const DerivedType *OldType,
const Type *NewType) { const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "StructTy::refineAbstractTy(" << (void*)OldType << "[" std::cerr << "StructTy::refineAbstractTy(" << (void*)OldType << "["
<< OldType->getDescription() << "], " << (void*)NewType << " [" << *OldType << "], " << (void*)NewType << " ["
<< NewType->getDescription() << "])\n"; << *NewType << "])\n";
#endif #endif
for (int i = ETypes.size()-1; i >= 0; --i) for (int i = ETypes.size()-1; i >= 0; --i)
if (ETypes[i] == OldType) { if (ETypes[i] == OldType) {
@ -1144,8 +1143,8 @@ void PointerType::refineAbstractType(const DerivedType *OldType,
const Type *NewType) { const Type *NewType) {
#ifdef DEBUG_MERGE_TYPES #ifdef DEBUG_MERGE_TYPES
std::cerr << "PointerTy::refineAbstractTy(" << (void*)OldType << "[" std::cerr << "PointerTy::refineAbstractTy(" << (void*)OldType << "["
<< OldType->getDescription() << "], " << (void*)NewType << " [" << *OldType << "], " << (void*)NewType << " ["
<< NewType->getDescription() << "])\n"; << *NewType << "])\n";
#endif #endif
assert(ElementType == OldType); assert(ElementType == OldType);