[llvm-commits] CVS: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
LLVM
llvm at cs.uiuc.edu
Tue May 25 07:22:03 PDT 2004
Changes in directory llvm/lib/Transforms/IPO:
MutateStructTypes.cpp updated: 1.46 -> 1.47
---
Log message:
Convert to SymbolTable's new iteration interface.
---
Diffs of the changes: (+8 -10)
Index: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
diff -u llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.46 llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.47
--- llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.46 Sun Feb 8 22:37:31 2004
+++ llvm/lib/Transforms/IPO/MutateStructTypes.cpp Tue May 25 03:51:14 2004
@@ -269,16 +269,13 @@
// Remap the symbol table to refer to the types in a nice way
//
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::type_iterator TI = ST.type_begin();
+ SymbolTable::type_iterator TE = ST.type_end();
+ for ( ; 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 = const_cast<Type*>(ConvertType(TI->second));
}
}
@@ -495,3 +492,4 @@
return true;
}
+// vim: sw=2
More information about the llvm-commits
mailing list