[libcxx-commits] [PATCH] D101206: [libc++] Remove UB in list, forward_list and __hash_table
David Blaikie via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 18 10:55:32 PDT 2023
dblaikie added a comment.
In D101206#4647403 <https://reviews.llvm.org/D101206#4647403>, @ldionne wrote:
> Rebase onto main, which contains the refactoring. Keep _LIBCPP_STANDALONE_DEBUG on the node types to avoid breaking debug info in C++03.
>
> I don't know how to add a test for this change, suggestions welcome.
I don't think the original commit had test coverage for this, probably - so "just as good" to still not have it.
I think the way to test it, if you wanted to, would be to `llvm-dwarfdump` a simple usage and check that the type definition is available.
It'd look something like...
RUN: clang x.cpp -g -c -o %t.o
RUN: llvm-dwarfdump %t.o | FileCheck %s
CHECK: DW_AT_name "SomeType"
CHECK-NOT: DW_AT_declaration
CHECK-NOT: DW_TAG
CHECK: DW_AT_byte_size
CHECK: DW_TAG
(This is sort of hedging my bets a bit - checking both that it's not a declaration, and that it does have a size (size isn't included in declarations) - there's some risk that the attributes are out of order and that declaration or size could come before name, but I don't think LLVM produces type attributes in that order - pretty sure the name comes first)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101206/new/
https://reviews.llvm.org/D101206
More information about the libcxx-commits
mailing list