mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
Link the type of aliases.
They are not more or less "well typed" than GlobalVariables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -786,6 +786,11 @@ void ModuleLinker::computeTypeMapping() {
|
||||
TypeMap.addTypeMapping(DGV->getType(), SGV.getType());
|
||||
}
|
||||
|
||||
for (GlobalValue &SGV : SrcM->aliases()) {
|
||||
if (GlobalValue *DGV = getLinkedToGlobal(&SGV))
|
||||
TypeMap.addTypeMapping(DGV->getType(), SGV.getType());
|
||||
}
|
||||
|
||||
// Incorporate types by name, scanning all the types in the source module.
|
||||
// At this point, the destination module may have a type "%foo = { i32 }" for
|
||||
// example. When the source module got loaded into the same LLVMContext, if
|
||||
@@ -829,8 +834,6 @@ void ModuleLinker::computeTypeMapping() {
|
||||
TypeMap.addTypeMapping(DST, ST);
|
||||
}
|
||||
|
||||
// Don't bother incorporating aliases, they aren't generally typed well.
|
||||
|
||||
// Now that we have discovered all of the type equivalences, get a body for
|
||||
// any 'opaque' types in the dest module that are now resolved.
|
||||
TypeMap.linkDefinedTypeBodies();
|
||||
|
Reference in New Issue
Block a user