[PATCH] D17992: Materialize metadata in IRLinker before value mapping
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 10:51:58 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL263143: Materialize metadata in IRLinker before value mapping (authored by tejohnson).
Changed prior to commit:
http://reviews.llvm.org/D17992?vs=50135&id=50308#toc
Repository:
rL LLVM
http://reviews.llvm.org/D17992
Files:
llvm/trunk/lib/Linker/IRMover.cpp
Index: llvm/trunk/lib/Linker/IRMover.cpp
===================================================================
--- llvm/trunk/lib/Linker/IRMover.cpp
+++ llvm/trunk/lib/Linker/IRMover.cpp
@@ -1492,6 +1492,11 @@
}
bool IRLinker::run() {
+ // Ensure metadata materialized before value mapping.
+ if (shouldLinkMetadata() && SrcM->getMaterializer())
+ if (SrcM->getMaterializer()->materializeMetadata())
+ return true;
+
// Inherit the target data from the source module if the destination module
// doesn't have one already.
if (DstM.getDataLayout().isDefault())
@@ -1559,13 +1564,9 @@
// Even if just linking metadata we should link decls above in case
// any are referenced by metadata. IRLinker::shouldLink ensures that
// we don't actually link anything from source.
- if (IsMetadataLinkingPostpass) {
- // Ensure metadata materialized
- if (SrcM->getMaterializer()->materializeMetadata())
- return true;
+ if (IsMetadataLinkingPostpass)
SrcM->getMaterializer()->saveMetadataList(MetadataToIDs,
/* OnlyTempMD = */ false);
- }
linkNamedMDNodes();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17992.50308.patch
Type: text/x-patch
Size: 1174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/a8a5fab2/attachment.bin>
More information about the llvm-commits
mailing list