[all-commits] [llvm/llvm-project] ed9584: [lldb][test] Add tests for alignof on class with o...

Michael Buch via All-commits all-commits at lists.llvm.org
Sat Jun 29 00:38:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed9584457def4a51596b9d72ce76a1bfed88fa30
      https://github.com/llvm/llvm-project/commit/ed9584457def4a51596b9d72ce76a1bfed88fa30
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2024-06-29 (Sat, 29 Jun 2024)

  Changed paths:
    A lldb/test/Shell/SymbolFile/DWARF/no_unique_address-base-alignment.cpp
    A lldb/test/Shell/SymbolFile/DWARF/packed-alignof.cpp
    M lldb/test/Shell/SymbolFile/DWARF/packed.cpp

  Log Message:
  -----------
  [lldb][test] Add tests for alignof on class with overlapping bases (#97068)

Follow-up to https://github.com/llvm/llvm-project/pull/96932

Adds XFAILed test where LLDB incorrectly infers the alignment of a
derived class whose bases are overlapping due to [[no_unique_address]].
Specifically, the `InferAlignment` code-path of the
`ItaniumRecordLayoutBuilder` assumes that overlapping base offsets imply
a packed structure and thus sets alignment to 1. See discussion in
https://github.com/llvm/llvm-project/pull/93809.

Also adds test where LLDB correctly infers an alignment of `1` when a
packed base class is overlapping with other bases.

Lastly, there were a couple of `alignof` inconsistencies which I
encapsulated in an XFAIL-ed `packed-alignof.cpp`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list