[PATCH] D54928: [ThinLTO] Correct linkonce_any function import linkage. NFC.
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 28 07:19:36 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL347763: [ThinLTO] Correct linkonce_any function import linkage. NFC. (authored by trentxintong, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54928/new/
https://reviews.llvm.org/D54928
Files:
llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
Index: llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -124,7 +124,6 @@
return SGV->getLinkage();
switch (SGV->getLinkage()) {
- case GlobalValue::LinkOnceAnyLinkage:
case GlobalValue::LinkOnceODRLinkage:
case GlobalValue::ExternalLinkage:
// External and linkonce definitions are converted to available_externally
@@ -144,11 +143,13 @@
// An imported available_externally declaration stays that way.
return SGV->getLinkage();
+ case GlobalValue::LinkOnceAnyLinkage:
case GlobalValue::WeakAnyLinkage:
- // Can't import weak_any definitions correctly, or we might change the
- // program semantics, since the linker will pick the first weak_any
- // definition and importing would change the order they are seen by the
- // linker. The module linking caller needs to enforce this.
+ // Can't import linkonce_any/weak_any definitions correctly, or we might
+ // change the program semantics, since the linker will pick the first
+ // linkonce_any/weak_any definition and importing would change the order
+ // they are seen by the linker. The module linking caller needs to enforce
+ // this.
assert(!doImportAsDefinition(SGV));
// If imported as a declaration, it becomes external_weak.
return SGV->getLinkage();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54928.175689.patch
Type: text/x-patch
Size: 1490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181128/11e7c0a2/attachment.bin>
More information about the llvm-commits
mailing list