ClaytonKnittel wrote:

> The original case where I got hit with this was some abseil map, the type 
> without debugging information was std::pair.
> 
> 
> 
> libstdc++ has these constructors for pair:
> 
> 
> 
> ```c++
> 
>       constexpr pair(const pair&) = default;    ///< Copy constructor
> 
>       constexpr pair(pair&&) = default;         ///< Move constructor
> 
> 
> 
>       template<typename... _Args1, typename... _Args2>
> 
>         _GLIBCXX20_CONSTEXPR
> 
>         pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
> 
> 
> 
>       template<typename... _Args1, size_t... _Indexes1,
> 
>                typename... _Args2, size_t... _Indexes2>
> 
>         _GLIBCXX20_CONSTEXPR
> 
>         pair(tuple<_Args1...>&, tuple<_Args2...>&,
> 
>              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
> 
> 
> 
>       constexpr
> 
>       explicit(__not_<__and_<__is_implicitly_default_constructible<_T1>,
> 
>                              __is_implicitly_default_constructible<_T2>>>())
> 
>       pair()
> 
>       noexcept(is_nothrow_default_constructible_v<_T1>
> 
>                 && is_nothrow_default_constructible_v<_T2>)
> 
>       requires is_default_constructible_v<_T1>
> 
>                && is_default_constructible_v<_T2>
> 
>       : first(), second()
> 
>       { }
> 
> 
> 
> ```
> 
> 
> 
> I see that abseil uses the piecewise_construct constructor, which at the 
> point of the template definition, is declared but not defined. It is defined 
> later.
> 
> 
> 
> Could it be that at the point the code checks whether the constexpr 
> constructor is defined or not, the compiler hasn't instantiated the 
> constructor definition?
> 
> 
> 
> 

Could you write a minimal repro that compiles but lacks debug info? I'm happy 
to try to fix-forward, and if we can't we can roll back the original change.

https://github.com/llvm/llvm-project/pull/221566
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to