diff options
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
| -rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 6 |
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: { |

