mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
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:
parent
b83b28697c
commit
da3c8a7674
@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user