[llvm] r299908 - [bugpoint] Also remove comdat's from externalized GVs
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 17:18:42 PDT 2017
Author: hfinkel
Date: Mon Apr 10 19:18:42 2017
New Revision: 299908
URL: http://llvm.org/viewvc/llvm-project?rev=299908&view=rev
Log:
[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!").
Modified:
llvm/trunk/tools/bugpoint/ExtractFunction.cpp
Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=299908&r1=299907&r2=299908&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original)
+++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Mon Apr 10 19:18:42 2017
@@ -209,6 +209,7 @@ static void eliminateAliases(GlobalValue
void llvm::DeleteGlobalInitializer(GlobalVariable *GV) {
eliminateAliases(GV);
GV->setInitializer(nullptr);
+ GV->setComdat(nullptr);
}
// DeleteFunctionBody - "Remove" the function by deleting all of its basic
More information about the llvm-commits
mailing list