[llvm] r299908 - [bugpoint] Also remove comdat's from externalized GVs
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 17:34:35 PDT 2017
On Mon, Apr 10, 2017 at 5:18 PM, Hal Finkel via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> 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);
> }
>
Do you have a testcase where this fails? If so, can you please add it?
Thanks!
--
Davide
More information about the llvm-commits
mailing list