summaryrefslogtreecommitdiff
path: root/tools/bugpoint
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
commita65ac0dca0c54d1b61680e60fa40e26d4c94a9b2 (patch)
treeef91fff6bc71b410668c8bbcb65fa63336d9f273 /tools/bugpoint
parenta8ca30150ca2337591260a5ad0853edbe3939394 (diff)
[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!"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/ExtractFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index d57613ec5e3..82c61b6e1be 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/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