[llvm-commits] [llvm] r52587 - in /llvm/trunk/lib/VMCore: Pass.cpp Type.cpp Value.cpp

Chris Lattner sabre at nondot.org
Sat Jun 21 12:47:03 PDT 2008


Author: lattner
Date: Sat Jun 21 14:47:03 2008
New Revision: 52587

URL: http://llvm.org/viewvc/llvm-project?rev=52587&view=rev
Log:
fix some warnings when assertions are disabled.

Modified:
    llvm/trunk/lib/VMCore/Pass.cpp
    llvm/trunk/lib/VMCore/Type.cpp
    llvm/trunk/lib/VMCore/Value.cpp

Modified: llvm/trunk/lib/VMCore/Pass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=52587&r1=52586&r2=52587&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Pass.cpp (original)
+++ llvm/trunk/lib/VMCore/Pass.cpp Sat Jun 21 14:47:03 2008
@@ -146,7 +146,7 @@
   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) {

Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=52587&r1=52586&r2=52587&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Sat Jun 21 14:47:03 2008
@@ -901,7 +901,7 @@
     // 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.
@@ -1426,7 +1426,7 @@
   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 << " "
@@ -1453,7 +1453,7 @@
   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);

Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=52587&r1=52586&r2=52587&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Sat Jun 21 14:47:03 2008
@@ -264,7 +264,7 @@
   // 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.





More information about the llvm-commits mailing list