|
9 | 9 | // type unit that is kept has the .dwo file name that it came from. When LLDB
|
10 | 10 | // loads the foreign type units, it needs to verify that any entries from
|
11 | 11 | // foreign type units come from the right .dwo file. We test this since the
|
12 |
| -// contents of type units are not always the same even though they have the same |
13 |
| -// type hash. We don't want invalid accelerator table entries to come from one |
14 |
| -// .dwo file and be used on a type unit from another since this could cause |
| 12 | +// contents of type units are not always the same even though they have the |
| 13 | +// same type hash. We don't want invalid accelerator table entries to come from |
| 14 | +// one .dwo file and be used on a type unit from another since this could cause |
15 | 15 | // invalid lookups to happen. LLDB knows how to track down which .dwo file a
|
16 | 16 | // type unit comes from by looking at the DW_AT_dwo_name attribute in the
|
17 | 17 | // DW_TAG_type_unit.
|
18 | 18 |
|
19 |
| -// Now test with DWARF5 |
20 | 19 | // RUN: %clang -target x86_64-pc-linux -gdwarf-5 -gsplit-dwarf \
|
21 | 20 | // RUN: -fdebug-types-section -gpubnames -c %s -o %t.main.o
|
22 | 21 | // RUN: %clang -target x86_64-pc-linux -gdwarf-5 -gsplit-dwarf -DVARIANT \
|
|
93 | 92 | // DWPFOO-NEXT: CustomType::FloatType y;
|
94 | 93 | // DWPFOO-NEXT: }
|
95 | 94 |
|
96 |
| -// We need to do this so we end with a type unit in each .dwo file and that has |
97 |
| -// the same signature but different contents. When we make the .dwp file, then |
98 |
| -// one of the type units will end up in the .dwp file and we will have |
99 |
| -// .debug_names accelerator tables for both type units and we need to ignore |
100 |
| -// the type units .debug_names entries that don't match the .dwo file whose |
101 |
| -// copy of the type unit ends up in the final .dwp file. To do this, LLDB will |
102 |
| -// look at the type unit and take the DWO name attribute and make sure it |
103 |
| -// matches, and if it doesn't, it will ignore the accelerator table entry. |
104 | 95 | struct CustomType {
|
105 | 96 | // We switch the order of "FloatType" and "IntegerType" so that if we do
|
106 | 97 | // end up reading the wrong accelerator table entry, that we would end up
|
|
0 commit comments