summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2017-04-11 00:18:42 +0000
committerHal Finkel <hfinkel@anl.gov>2017-04-11 00:18:42 +0000
commit55379ab8c719efc27c525dbc73dbb6b186f88724 (patch)
tree717af4d33a4c0c05bbb8a264368736ba342d6dd3 /llvm/tools/bugpoint/ExtractFunction.cpp
parent76ad7d6e242011d59d7341e2c78ea5df6cff0251 (diff)
downloadbcm5719-llvm-55379ab8c719efc27c525dbc73dbb6b186f88724.tar.gz
bcm5719-llvm-55379ab8c719efc27c525dbc73dbb6b186f88724.zip
[bugpoint] Also remove comdat's from externalized GVs
We were removing comdats from externalized functions (function declarations can't be comdat), but were not doing the same for variable. Failure to do this would cause bugpoint to fail ("Declaration may not be in a Comdat!"). llvm-svn: 299908
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index d57613ec5e3..82c61b6e1be 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -209,6 +209,7 @@ static void eliminateAliases(GlobalValue *GV) {
void llvm::DeleteGlobalInitializer(GlobalVariable *GV) {
eliminateAliases(GV);
GV->setInitializer(nullptr);
+ GV->setComdat(nullptr);
}
// DeleteFunctionBody - "Remove" the function by deleting all of its basic
OpenPOWER on IntegriCloud