summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 55654ac25d6..49c5e1cc13e 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -604,6 +604,8 @@ bool ModuleLinker::getLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
// Compute the visibility. We follow the rules in the System V Application
// Binary Interface.
+ assert(!GlobalValue::isLocalLinkage(LT) &&
+ "Symbols with local linkage should not be merged");
Vis = isLessConstraining(Src->getVisibility(), Dest->getVisibility()) ?
Dest->getVisibility() : Src->getVisibility();
return false;
OpenPOWER on IntegriCloud