summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2015-11-06 17:50:48 +0000
committerTeresa Johnson <tejohnson@google.com>2015-11-06 17:50:48 +0000
commit189b2526527c02b9ef4234266b51807308d4662a (patch)
treeb3e980b52b227f213ddc5b7e356ee5dcfeee688b /llvm/lib
parentb8fd162fc569449fcf4e650978865c6437edd739 (diff)
downloadbcm5719-llvm-189b2526527c02b9ef4234266b51807308d4662a.tar.gz
bcm5719-llvm-189b2526527c02b9ef4234266b51807308d4662a.zip
Restore "Move metadata linking after lazy global materialization/linking."
This reverts commit r251965. llvm-svn: 252319
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 4a12633c305..74ca197ddb3 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -1892,15 +1892,6 @@ bool ModuleLinker::run() {
linkGlobalValueBody(Src);
}
- // Remap all of the named MDNodes in Src into the DstM module. We do this
- // after linking GlobalValues so that MDNodes that reference GlobalValues
- // are properly remapped.
- linkNamedMDNodes();
-
- // Merge the module flags into the DstM module.
- if (linkModuleFlagsMetadata())
- return true;
-
// Update the initializers in the DstM module now that all globals that may
// be referenced are in DstM.
for (GlobalVariable &Src : SrcM->globals()) {
@@ -1927,6 +1918,15 @@ bool ModuleLinker::run() {
return true;
}
+ // Remap all of the named MDNodes in Src into the DstM module. We do this
+ // after linking GlobalValues so that MDNodes that reference GlobalValues
+ // are properly remapped.
+ linkNamedMDNodes();
+
+ // Merge the module flags into the DstM module.
+ if (linkModuleFlagsMetadata())
+ return true;
+
return false;
}
OpenPOWER on IntegriCloud