2 Commits

Author SHA1 Message Date
David Spickett
6f55c134d4 [clang[test] Require x86 target for new tests
Fixes d199ab469949b104bc4fbb888251ee184fd53de1.
2024-01-12 16:08:52 +00:00
Alexander Yermolovich
d199ab4699
[LLVM][DWARF] Fix accelerator table switching between CU and TU (#77511)
Bug 1 is triggered when a TU is already created, and we process the same
DICompositeType at a top level. We would switch to TU accelerator table,
but
would not switch back on early exit. As the result we would add CU
entries to the TU
accelerator table. When we try to write out TUs and normalize entries,
the
offsets for DIEs that are part of a CU would not have been computed, and
it
would assert on getOffset().

Bug 2 is triggered when processing nested TUs. When we exit from
addDwarfTypeUnitType we switched back to CU accelerator table. If we
were processing nested TUs, the rest of the entries from TUs would be
added to CU accelerator table. When we write out TUs, all the DIE
pointers will become invalid. Eventually it will assert during
normalization step after CU is processed.
2024-01-12 07:01:17 -08:00