*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-07-24 22:08:53 +00:00
parent 7f4dd472e3
commit fe8041ae39
13 changed files with 41 additions and 42 deletions

View File

@@ -18,7 +18,7 @@ static inline const Type *checkType(const Type *Ty) {
return Ty;
}
Value::Value(const Type *ty, ValueTy vty, const std::string &name = "")
Value::Value(const Type *ty, ValueTy vty, const std::string &name)
: Name(name), Ty(checkType(ty), this) {
VTy = vty;
}
@@ -33,11 +33,9 @@ Value::~Value() {
//
if (Uses.begin() != Uses.end()) {
std::cerr << "While deleting: " << Ty << "%" << Name << "\n";
for (use_const_iterator I = Uses.begin(); I != Uses.end(); ++I) {
std::cerr << "Use still stuck around after Def is destroyed:";
(*I)->dump();
std::cerr << "\n";
}
for (use_const_iterator I = Uses.begin(); I != Uses.end(); ++I)
std::cerr << "Use still stuck around after Def is destroyed:"
<< **I << "\n";
}
#endif
assert(Uses.begin() == Uses.end());
@@ -56,12 +54,8 @@ void Value::replaceAllUsesWith(Value *D) {
Use->replaceUsesOfWith(this, D);
#ifndef NDEBUG // only in -g mode...
if (Uses.size() == NumUses) {
std::cerr << "Use: ";
Use->dump();
std::cerr << "replace with: ";
D->dump();
}
if (Uses.size() == NumUses)
std::cerr << "Use: " << *Use << "replace with: " << *D;
#endif
assert(Uses.size() != NumUses && "Didn't remove definition!");
}
@@ -73,7 +67,7 @@ void Value::replaceAllUsesWith(Value *D) {
// change Ty to point to the right type. :)
//
void Value::refineAbstractType(const DerivedType *OldTy, const Type *NewTy) {
assert(Ty.get() == OldTy &&"Can't refine anything but my type!");
assert(Ty.get() == OldTy && "Can't refine anything but my type!");
if (OldTy == NewTy && !OldTy->isAbstract())
Ty.removeUserFromConcrete();
Ty = NewTy;