aboutsummaryrefslogtreecommitdiff
path: root/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-31 19:27:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-31 19:27:28 +0000
commitec304151b74f9254d7029ee4d197ce1f7cbe501a (patch)
tree63e4ed55e4fbb581fd4731d44a327a7b3278e0a1 /tools/gold/gold-plugin.cpp
parent67c32a98315f785a9ec9d531c1f571a0196c7463 (diff)
Diffstat (limited to 'tools/gold/gold-plugin.cpp')
-rw-r--r--tools/gold/gold-plugin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index bcc91e9d0612..5524bb9922c5 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/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->isDeclarationForLinker()) {
+ assert(GV->hasComdat());
+ Drop.insert(GV);
+ }
break;
case LDPR_PREVAILING_DEF_IRONLY: {