projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76ad7d6
)
[bugpoint] Also remove comdat's from externalized GVs
author
Hal Finkel
<hfinkel@anl.gov>
Tue, 11 Apr 2017 00:18:42 +0000
(
00:18
+0000)
committer
Hal Finkel
<hfinkel@anl.gov>
Tue, 11 Apr 2017 00:18:42 +0000
(
00:18
+0000)
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
llvm/tools/bugpoint/ExtractFunction.cpp
patch
|
blob
|
history
diff --git
a/llvm/tools/bugpoint/ExtractFunction.cpp
b/llvm/tools/bugpoint/ExtractFunction.cpp
index d57613ec5e37688f6a744e4ec3e5be2b9f651220..82c61b6e1be7aa52a76750c82b4cbbc9ea378e1d 100644
(file)
--- 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