[libcxx-commits] [libcxx] [libc++] Add __detected_or_t and use it to implement some of the allocator traits aliases (PR #115654)
David Blaikie via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 4 10:45:25 PST 2024
dwblaikie wrote:
> Is there a reason we should ever not put a `_LIBCPP_NODEBUG` on internal aliases?
Don't think so?
> I don't really see how this could have anything to do with anything but aliases, since the number of struct instantiations shouldn't change.
Instantiations don't directly cause DWARF to be emitted - the instantiation has to be referenced by something, so avoiding references to the struct instantiation can reduce the debug info size cost.
Specifically, putting `_LIBCPP_NODEBUG` on the `type` member of a type trait struct avoids needing to describe the struct (to put the `type` member inside of it), which saves a bunch of DWARF. Non-member aliases are nice to attribute too/nice to avoid describing in the DWARF - but the struct types are especially expensive/more verbose than non-member aliases.
https://github.com/llvm/llvm-project/pull/115654
More information about the libcxx-commits
mailing list