From: Chris Lattner Date: Wed, 20 Nov 2002 19:32:43 +0000 (+0000) Subject: Fix symbol table problem X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=da3c8a76748bd366f63f676df312319829c169e8;p=oota-llvm.git Fix symbol table problem git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4785 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp index 2c024804e43..b7418ec6e3e 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(ConvertType(cast(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(ConvertType(cast(TI->second))); } } }