fix some warnings when assertions are disabled.
authorChris Lattner <sabre@nondot.org>
Sat, 21 Jun 2008 19:47:03 +0000 (19:47 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 21 Jun 2008 19:47:03 +0000 (19:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52587 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Pass.cpp
lib/VMCore/Type.cpp
lib/VMCore/Value.cpp

index d874d8b997c7f8d30b17a7d97fe56df2cf638ae5..d04f90c127a295f342da38ac58d8c59eb21977f6 100644 (file)
@@ -146,7 +146,7 @@ public:
   void RegisterPass(const PassInfo &PI) {
     bool Inserted =
       PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second;
   void RegisterPass(const PassInfo &PI) {
     bool Inserted =
       PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second;
-    assert(Inserted && "Pass registered multiple times!");
+    assert(Inserted && "Pass registered multiple times!"); Inserted=Inserted;
   }
   
   void UnregisterPass(const PassInfo &PI) {
   }
   
   void UnregisterPass(const PassInfo &PI) {
index 40185ac5b5cbfa7b18e1c5153733203db4ea0dd8..3a9ea582f112efb088d357bd55f48f55f133986e 100644 (file)
@@ -901,7 +901,7 @@ public:
     // The old record is now out-of-date, because one of the children has been
     // updated.  Remove the obsolete entry from the map.
     unsigned NumErased = Map.erase(ValType::get(Ty));
     // The old record is now out-of-date, because one of the children has been
     // updated.  Remove the obsolete entry from the map.
     unsigned NumErased = Map.erase(ValType::get(Ty));
-    assert(NumErased && "Element not found!");
+    assert(NumErased && "Element not found!"); NumErased = NumErased;
 
     // Remember the structural hash for the type before we start hacking on it,
     // in case we need it later.
 
     // Remember the structural hash for the type before we start hacking on it,
     // in case we need it later.
@@ -1426,7 +1426,7 @@ void DerivedType::refineAbstractTypeTo(const Type *NewType) {
   while (!AbstractTypeUsers.empty() && NewTy != this) {
     AbstractTypeUser *User = AbstractTypeUsers.back();
 
   while (!AbstractTypeUsers.empty() && NewTy != this) {
     AbstractTypeUser *User = AbstractTypeUsers.back();
 
-    unsigned OldSize = AbstractTypeUsers.size();
+    unsigned OldSize = AbstractTypeUsers.size(); OldSize=OldSize;
 #ifdef DEBUG_MERGE_TYPES
     DOUT << " REFINING user " << OldSize-1 << "[" << (void*)User
          << "] of abstract type [" << (void*)this << " "
 #ifdef DEBUG_MERGE_TYPES
     DOUT << " REFINING user " << OldSize-1 << "[" << (void*)User
          << "] of abstract type [" << (void*)this << " "
@@ -1453,7 +1453,7 @@ void DerivedType::notifyUsesThatTypeBecameConcrete() {
   DOUT << "typeIsREFINED type: " << (void*)this << " " << *this << "\n";
 #endif
 
   DOUT << "typeIsREFINED type: " << (void*)this << " " << *this << "\n";
 #endif
 
-  unsigned OldSize = AbstractTypeUsers.size();
+  unsigned OldSize = AbstractTypeUsers.size(); OldSize=OldSize;
   while (!AbstractTypeUsers.empty()) {
     AbstractTypeUser *ATU = AbstractTypeUsers.back();
     ATU->typeBecameConcrete(this);
   while (!AbstractTypeUsers.empty()) {
     AbstractTypeUser *ATU = AbstractTypeUsers.back();
     ATU->typeBecameConcrete(this);
index e581fe83807331d7569e4c55e09c167a998f5741..5df3532769c283b2650bb9a8e92128f90eac2774 100644 (file)
@@ -264,7 +264,7 @@ void Value::takeName(Value *V) {
   // Get V's ST, this should always succed, because V has a name.
   ValueSymbolTable *VST;
   bool Failure = getSymTab(V, VST);
   // Get V's ST, this should always succed, because V has a name.
   ValueSymbolTable *VST;
   bool Failure = getSymTab(V, VST);
-  assert(!Failure && "V has a name, so it should have a ST!");
+  assert(!Failure && "V has a name, so it should have a ST!"); Failure=Failure;
   
   // If these values are both in the same symtab, we can do this very fast.
   // This works even if both values have no symtab yet.
   
   // If these values are both in the same symtab, we can do this very fast.
   // This works even if both values have no symtab yet.