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