[llvm] [AsmPrinter][DebugNames] Implement DW_IDX_parent entries (PR #77457)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 12:34:32 PST 2024
ayermolo wrote:
> > Maybe an extra test to capture when DIEs have the same offsets?
>
> Do you have any suggestions on how to create this situation? It seems hard to control the offset of DIEs for tests that start from `.ll` inputs 🤔
Two TUs with similar structure should have the same relative offsets.
Something like:
clang++ -g2 -gpubnames -fdebug-types-section main.cpp
```
struct Foo {
char f1;
};
struct Foo2 {
char f2;
};
Foo fooGlobal;
Foo2 foo2Global;
```
```
Name 4 {
Hash: 0x7C952063
String: 0x0000005d "char"
Entry @ 0xcc {
Abbrev: 0x48c
Tag: DW_TAG_base_type
DW_IDX_type_unit: 0x00
DW_IDX_die_offset: 0x00000033
}
Entry @ 0xd3 {
Abbrev: 0x48c
Tag: DW_TAG_base_type
DW_IDX_type_unit: 0x01
DW_IDX_die_offset: 0x00000033
}
}
```
https://github.com/llvm/llvm-project/pull/77457
More information about the llvm-commits
mailing list