diff options
| author | Teresa Johnson <tejohnson@google.com> | 2015-11-06 17:50:48 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2015-11-06 17:50:48 +0000 |
| commit | 189b2526527c02b9ef4234266b51807308d4662a (patch) | |
| tree | b3e980b52b227f213ddc5b7e356ee5dcfeee688b /llvm/lib | |
| parent | b8fd162fc569449fcf4e650978865c6437edd739 (diff) | |
| download | bcm5719-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.cpp | 18 |
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; } |

