[llvm] r308140 - [Dominators] Workaround explicit instantiation bug.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 16 22:01:17 PDT 2017


On Sun, Jul 16, 2017 at 10:01 AM, Jakub Kuderski via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: kuhar
> Date: Sun Jul 16 10:01:40 2017
> New Revision: 308140
>
> URL: http://llvm.org/viewvc/llvm-project?rev=308140&view=rev
> Log:
> [Dominators] Workaround explicit instantiation bug.
>
> Some platforms have problems with emmiting constructors when class
> templates get explicitly instantiated.
> This patch fixes the bug reported in D35315 by replacing `= default`
> with an empty constructor body.
>
> Modified:
>     llvm/trunk/include/llvm/Support/GenericDomTree.h
>
> Modified: llvm/trunk/include/llvm/Support/GenericDomTree.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=308140&r1=308139&r2=308140&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/GenericDomTree.h (original)
> +++ llvm/trunk/include/llvm/Support/GenericDomTree.h Sun Jul 16 10:01:40 2017
> @@ -230,7 +230,7 @@ class DominatorTreeBase {
>    using NodePtr = NodeT *;
>    static constexpr bool IsPostDominator = IsPostDom;
>
> -  DominatorTreeBase() = default;
> +  DominatorTreeBase() {}
>

This is fine, but can you please add a comment explaining we're
working around a GCC issue (so that when we drop GCC x.y.z we can
remove this code or switch back to `= default`)?

Thanks!

--
Davide


More information about the llvm-commits mailing list