summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/ModuleUtils.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-10-05 21:54:53 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-10-05 21:54:53 +0000
commit715bcfe0c9f1b2b14723465e26427791c59cac98 (patch)
tree619df7252b8e937ffc2df5400979829a70986932 /llvm/lib/Transforms/Utils/ModuleUtils.cpp
parent9da3c75a1356cb0a67cc329f246a4a40bbb450db (diff)
downloadbcm5719-llvm-715bcfe0c9f1b2b14723465e26427791c59cac98.tar.gz
bcm5719-llvm-715bcfe0c9f1b2b14723465e26427791c59cac98.zip
ModuleUtils: Stop using comdat members to generate unique module ids.
It is possible for two modules to define the same set of external symbols without causing a duplicate symbol error at link time, as long as each of the symbols is a comdat member. So we cannot use them as part of a unique id for the module. Differential Revision: https://reviews.llvm.org/D38602 llvm-svn: 315026
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ModuleUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ModuleUtils.cpp b/llvm/lib/Transforms/Utils/ModuleUtils.cpp
index 2ef3d6336ae..ba4b7f3cc26 100644
--- a/llvm/lib/Transforms/Utils/ModuleUtils.cpp
+++ b/llvm/lib/Transforms/Utils/ModuleUtils.cpp
@@ -243,7 +243,7 @@ std::string llvm::getUniqueModuleId(Module *M) {
bool ExportsSymbols = false;
auto AddGlobal = [&](GlobalValue &GV) {
if (GV.isDeclaration() || GV.getName().startswith("llvm.") ||
- !GV.hasExternalLinkage())
+ !GV.hasExternalLinkage() || GV.hasComdat())
return;
ExportsSymbols = true;
Md5.update(GV.getName());
OpenPOWER on IntegriCloud