[all-commits] [llvm/llvm-project] 46e848: [lldb][test] Add test-cases for packed/aligned str...

Michael Buch via All-commits all-commits at lists.llvm.org
Fri Jun 28 06:15:31 PDT 2024


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

  Changed paths:
    M lldb/test/API/lang/cpp/alignas_base_class/TestAlignAsBaseClass.py
    M lldb/test/API/lang/cpp/alignas_base_class/main.cpp
    A lldb/test/Shell/SymbolFile/DWARF/no_unique_address-alignment.cpp
    A lldb/test/Shell/SymbolFile/DWARF/packed.cpp

  Log Message:
  -----------
  [lldb][test] Add test-cases for packed/aligned structures (#96932)

Adds test that checks whether LLDB correctly infers the
alignment of packed structures. Specifically, the
`InferAlignment` code-path of the `ItaniumRecordLayoutBuilder`
where it assumes that overlapping field offsets imply a
packed structure and thus sets alignment to `1`. See discussion
in https://github.com/llvm/llvm-project/pull/93809.

While here, also added a test-case where we check alignment of
a class whose base has an explicit `DW_AT_alignment
(those don't get transitively propagated in DWARF, but don't seem
like a problem for LLDB).

Lastly, also added an XFAIL-ed tests where the aforementioned
`InferAlignment` kicks in for overlapping fields (but in this
case incorrectly since the structure isn't actually packed).



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