summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index bcc91e9d061..4c21b38c152 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -633,8 +633,10 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile,
break;
case LDPR_UNDEF:
- assert(GV->hasComdat());
- Drop.insert(GV);
+ if (!GV->hasExternalWeakLinkage()) {
+ assert(GV->hasComdat());
+ Drop.insert(GV);
+ }
break;
case LDPR_PREVAILING_DEF_IRONLY: {
OpenPOWER on IntegriCloud