aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-20 19:32:43 +0000
committerChris Lattner <sabre@nondot.org>2002-11-20 19:32:43 +0000
commitda3c8a76748bd366f63f676df312319829c169e8 (patch)
tree9f936291e69686c2c25f0eb7d9681e4b1681e58d /lib
parentb83b28697ccabfcb6b8ddbc73fb3c4554f6d17ce (diff)
downloadexternal_llvm-da3c8a76748bd366f63f676df312319829c169e8.zip
external_llvm-da3c8a76748bd366f63f676df312319829c169e8.tar.gz
external_llvm-da3c8a76748bd366f63f676df312319829c169e8.tar.bz2
Fix symbol table problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/IPO/MutateStructTypes.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp
index 2c02480..b7418ec 100644
--- a/lib/Transforms/IPO/MutateStructTypes.cpp
+++ b/lib/Transforms/IPO/MutateStructTypes.cpp
@@ -266,17 +266,16 @@ void MutateStructTypes::processGlobals(Module &M) {
// 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)));
}
}
}