mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Link NamedMDNode before linking function bodies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135204 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33c16a2737
commit
2959ebd14d
@ -896,6 +896,11 @@ bool ModuleLinker::run() {
|
|||||||
// Loop over all of the linked values to compute type mappings.
|
// Loop over all of the linked values to compute type mappings.
|
||||||
computeTypeMapping();
|
computeTypeMapping();
|
||||||
|
|
||||||
|
// Remap all of the named mdnoes in Src into the DstM module. We do this
|
||||||
|
// after linking GlobalValues so that MDNodes that reference GlobalValues
|
||||||
|
// are properly remapped.
|
||||||
|
linkNamedMDNodes();
|
||||||
|
|
||||||
// Insert all of the globals in src into the DstM module... without linking
|
// Insert all of the globals in src into the DstM module... without linking
|
||||||
// initializers (which could refer to functions not yet mapped over).
|
// initializers (which could refer to functions not yet mapped over).
|
||||||
for (Module::global_iterator I = SrcM->global_begin(),
|
for (Module::global_iterator I = SrcM->global_begin(),
|
||||||
@ -936,11 +941,6 @@ bool ModuleLinker::run() {
|
|||||||
// Resolve all uses of aliases with aliasees.
|
// Resolve all uses of aliases with aliasees.
|
||||||
linkAliasBodies();
|
linkAliasBodies();
|
||||||
|
|
||||||
// Remap all of the named mdnoes in Src into the DstM module. We do this
|
|
||||||
// after linking GlobalValues so that MDNodes that reference GlobalValues
|
|
||||||
// are properly remapped.
|
|
||||||
linkNamedMDNodes();
|
|
||||||
|
|
||||||
// Now that all of the types from the source are used, resolve any structs
|
// Now that all of the types from the source are used, resolve any structs
|
||||||
// copied over to the dest that didn't exist there.
|
// copied over to the dest that didn't exist there.
|
||||||
TypeMap.linkDefinedTypeBodies();
|
TypeMap.linkDefinedTypeBodies();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user