[llvm-commits] CVS: llvm/lib/Transforms/IPO/MutateStructTypes.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 20 13:33:01 PST 2002


Changes in directory llvm/lib/Transforms/IPO:

MutateStructTypes.cpp updated: 1.33 -> 1.34

---
Log message:

Fix symbol table problem


---
Diffs of the changes:

Index: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
diff -u llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.33 llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.34
--- llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.33	Tue Nov 19 14:49:40 2002
+++ llvm/lib/Transforms/IPO/MutateStructTypes.cpp	Wed Nov 20 13:32:43 2002
@@ -266,17 +266,16 @@
 
   // Remap the symbol table to refer to the types in a nice way
   //
-  if (SymbolTable *ST = M.getSymbolTable()) {    
-    SymbolTable::iterator I = ST->find(Type::TypeTy);
-    if (I != ST->end()) {    // Get the type plane for Type's
-      SymbolTable::VarMap &Plane = I->second;
-      for (SymbolTable::type_iterator TI = Plane.begin(), TE = Plane.end();
-           TI != TE; ++TI) {
-        // FIXME: This is gross, I'm reaching right into a symbol table and
-        // mucking around with it's internals... but oh well.
-        //
-        TI->second = (Value*)cast<Type>(ConvertType(cast<Type>(TI->second)));
-      }
+  SymbolTable &ST = M.getSymbolTable();
+  SymbolTable::iterator I = ST.find(Type::TypeTy);
+  if (I != ST.end()) {    // Get the type plane for Type's
+    SymbolTable::VarMap &Plane = I->second;
+    for (SymbolTable::type_iterator TI = Plane.begin(), TE = Plane.end();
+         TI != TE; ++TI) {
+      // FIXME: This is gross, I'm reaching right into a symbol table and
+      // mucking around with it's internals... but oh well.
+      //
+      TI->second = (Value*)cast<Type>(ConvertType(cast<Type>(TI->second)));
     }
   }
 }





More information about the llvm-commits mailing list