[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri May 28 00:34:17 PDT 2004


Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.178 -> 1.179

---
Log message:

Minor changes.  Switch to a SymbolTable remove that does not take linear time


---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.178 llvm/lib/Target/CBackend/Writer.cpp:1.179
--- llvm/lib/Target/CBackend/Writer.cpp:1.178	Wed May 26 12:20:52 2004
+++ llvm/lib/Target/CBackend/Writer.cpp	Fri May 28 00:30:51 2004
@@ -226,7 +226,7 @@
       // If this is not used, remove it from the symbol table.
       std::set<const Type *>::iterator UTI = UT.find(STy);
       if (UTI == UT.end())
-        MST.remove(I->first, (Type*)I->second);
+        MST.remove(I);
       else
         UT.erase(UTI);
     }
@@ -239,7 +239,7 @@
   for (std::set<const Type *>::const_iterator I = UT.begin(), E = UT.end();
        I != E; ++I)
     if (const StructType *ST = dyn_cast<StructType>(*I)) {
-      ((Value*)ST)->setName("unnamed", &MST);
+      const_cast<StructType*>(ST)->setName("unnamed", &MST);
       Changed = true;
     }
   return Changed;





More information about the llvm-commits mailing list