[llvm-commits] CVS: llvm/lib/VMCore/SymbolTable.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Mar 5 11:02:31 PST 2005



Changes in directory llvm/lib/VMCore:

SymbolTable.cpp updated: 1.50 -> 1.51
---
Log message:

2nd arg to setName goes away.


---
Diffs of the changes:  (+5 -8)

 SymbolTable.cpp |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)


Index: llvm/lib/VMCore/SymbolTable.cpp
diff -u llvm/lib/VMCore/SymbolTable.cpp:1.50 llvm/lib/VMCore/SymbolTable.cpp:1.51
--- llvm/lib/VMCore/SymbolTable.cpp:1.50	Sun Feb 13 11:54:21 2005
+++ llvm/lib/VMCore/SymbolTable.cpp	Sat Mar  5 13:02:15 2005
@@ -217,7 +217,7 @@
       assert(InternallyInconsistent == false &&
              "Infinite loop inserting value!");
       InternallyInconsistent = true;
-      V->setName(UniqueName, this);
+      V->setName(UniqueName);
       InternallyInconsistent = false;
       return;
     }
@@ -281,7 +281,7 @@
 
 
 // Get the name of a type
-std::string SymbolTable::get_name( const Type* T ) const {
+std::string SymbolTable::get_name(const Type* T) const {
   if (tmap.empty()) return ""; // No types at all.
 
   type_const_iterator TI = tmap.begin();
@@ -298,7 +298,7 @@
 
 
 // Strip the symbol table of its names.
-bool SymbolTable::strip( void ) {
+bool SymbolTable::strip() {
   bool RemovedSymbol = false;
   for (plane_iterator I = pmap.begin(); I != pmap.end();) {
     // Removing items from the plane can cause the plane itself to get deleted.
@@ -307,12 +307,9 @@
     value_iterator B = Plane.begin(), Bend = Plane.end();
     while (B != Bend) {   // Found nonempty type plane!
       Value *V = B->second;
-      if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()){
+      if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()) {
         // Set name to "", removing from symbol table!
-        V->setName("", this);
-        RemovedSymbol = true;
-      } else if (isa<Constant>(V) ) {
-        remove(V);
+        V->setName("");
         RemovedSymbol = true;
       }
       ++B;






More information about the llvm-commits mailing list