[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SymbolStripping.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 20 12:35:05 PST 2002


Changes in directory llvm/lib/Transforms/Scalar:

SymbolStripping.cpp updated: 1.20 -> 1.21

---
Log message:

  - Eliminated the deferred symbol table stuff in Module & Function, it really
    wasn't an optimization and it was causing lots of bugs.



---
Diffs of the changes:

Index: llvm/lib/Transforms/Scalar/SymbolStripping.cpp
diff -u llvm/lib/Transforms/Scalar/SymbolStripping.cpp:1.20 llvm/lib/Transforms/Scalar/SymbolStripping.cpp:1.21
--- llvm/lib/Transforms/Scalar/SymbolStripping.cpp:1.20	Fri Sep 13 22:04:02 2002
+++ llvm/lib/Transforms/Scalar/SymbolStripping.cpp	Wed Nov 20 12:34:38 2002
@@ -19,20 +19,19 @@
 #include "llvm/SymbolTable.h"
 #include "llvm/Pass.h"
 
-static bool StripSymbolTable(SymbolTable *SymTab) {
-  if (SymTab == 0) return false;    // No symbol table?  No problem.
+static bool StripSymbolTable(SymbolTable &SymTab) {
   bool RemovedSymbol = false;
 
-  for (SymbolTable::iterator I = SymTab->begin(); I != SymTab->end(); ++I) {
+  for (SymbolTable::iterator I = SymTab.begin(); I != SymTab.end(); ++I) {
     std::map<const std::string, Value *> &Plane = I->second;
     
     SymbolTable::type_iterator B;
     while ((B = Plane.begin()) != Plane.end()) {   // Found nonempty type plane!
       Value *V = B->second;
       if (isa<Constant>(V) || isa<Type>(V))
-	SymTab->type_remove(B);
+	SymTab.type_remove(B);
       else 
-	V->setName("", SymTab);   // Set name to "", removing from symbol table!
+	V->setName("", &SymTab);  // Set name to "", removing from symbol table!
       RemovedSymbol = true;
       assert(Plane.begin() != B && "Symbol not removed from table!");
     }





More information about the llvm-commits mailing list