Created
March 15, 2022 20:45
-
-
Save int3/b66de20462da71e8757e09bacfc361ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp | |
index 426f7efd5b7f..d3137c573c3e 100644 | |
--- a/llvm/lib/LTO/LTO.cpp | |
+++ b/llvm/lib/LTO/LTO.cpp | |
@@ -348,8 +348,9 @@ static void thinLTOResolvePrevailingGUID( | |
// aspects into separate routines. | |
if (isPrevailing(VI.getGUID(), S.get())) { | |
if (GlobalValue::isLinkOnceLinkage(OriginalLinkage)) { | |
- S->setLinkage(GlobalValue::getWeakLinkage( | |
- GlobalValue::isLinkOnceODRLinkage(OriginalLinkage))); | |
+ if (VI.getSummaryList().size() > 1) | |
+ S->setLinkage(GlobalValue::getWeakLinkage( | |
+ GlobalValue::isLinkOnceODRLinkage(OriginalLinkage))); | |
// The kept copy is eligible for auto-hiding (hidden visibility) if all | |
// copies were (i.e. they were all linkonce_odr global unnamed addr). | |
// If any copy is not (e.g. it was originally weak_odr), then the symbol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment