summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-04 19:44:28 +0000
committerDevang Patel <dpatel@apple.com>2011-08-04 19:44:28 +0000
commit6ddbb2e2777beae5bc86c91232f6c9a1971ba9bd (patch)
tree0baddaedb4a4d3937f022992fdeb9bd6f3624dad /llvm/lib/Linker/LinkModules.cpp
parente8baa38e79486123f17406a9bfe2b53583db8eff (diff)
downloadbcm5719-llvm-6ddbb2e2777beae5bc86c91232f6c9a1971ba9bd.tar.gz
bcm5719-llvm-6ddbb2e2777beae5bc86c91232f6c9a1971ba9bd.zip
Linke NamedMDNodes after linking global values as comment suggests.
llvm-svn: 136909
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 0c078607bc8..b075711b7d4 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -896,11 +896,6 @@ bool ModuleLinker::run() {
// Loop over all of the linked values to compute type mappings.
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
// initializers (which could refer to functions not yet mapped over).
for (Module::global_iterator I = SrcM->global_begin(),
@@ -941,6 +936,11 @@ bool ModuleLinker::run() {
// Resolve all uses of aliases with aliasees.
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
// copied over to the dest that didn't exist there.
TypeMap.linkDefinedTypeBodies();
OpenPOWER on IntegriCloud