Make the release build work
[oota-llvm.git] / lib / VMCore / Value.cpp
index c4327a1814dc16870bf32f71b3468def16b4a4c5..9dc19dffb027a8484ef09edec682e77070440792 100644 (file)
@@ -50,6 +50,8 @@ Value::~Value() {
 void Value::replaceAllUsesWith(Value *D) {
   assert(D && "Value::replaceAllUsesWith(<null>) is invalid!");
   assert(D != this && "V->replaceAllUsesWith(V) is NOT valid!");
+  assert(D->getType() == getType() &&
+         "replaceAllUses of value with new value of different type!");
   while (!Uses.empty()) {
     User *Use = Uses.back();
 #ifndef NDEBUG
@@ -92,11 +94,9 @@ User *Value::use_remove(use_iterator &I) {
   return i;
 }
 
-#ifndef NDEBUG      // Only in -g mode...
 void Value::dump() const {
   cerr << this;
 }
-#endif
 
 //===----------------------------------------------------------------------===//
 //                                 User Class