Fix symbol table problem

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4785 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-11-20 19:32:43 +00:00
parent b83b28697c
commit da3c8a7674

View File

@ -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)));
}
}
}