[llvm-commits] [bug_122] CVS: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
LLVM
llvm at cs.uiuc.edu
Sun May 16 21:39:02 PDT 2004
Changes in directory llvm/lib/Transforms/IPO:
MutateStructTypes.cpp updated: 1.46.4.1 -> 1.46.4.2
---
Log message:
Changes necessary resulting from SymbolTable's new interface for handling
Types and Values distinctly.
---
Diffs of the changes: (+8 -10)
Index: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
diff -u llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.46.4.1 llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.46.4.2
--- llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.46.4.1 Wed May 12 11:33:43 2004
+++ llvm/lib/Transforms/IPO/MutateStructTypes.cpp Sun May 16 21:39:41 2004
@@ -269,16 +269,13 @@
// Remap the symbol table to refer to the types in a nice way
//
SymbolTable &ST = M.getSymbolTable();
- SymbolTable::type_iterator I = ST.find(Type::TypeTy);
- if (I != ST.end()) { // Get the type plane for Type's
- SymbolTable::ValueMap &Plane = I->second;
- for (SymbolTable::value_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