Skip to content

Commit

Permalink
[lldb][test] Skip bitfield enum tests for DWARF v2 and below
Browse files Browse the repository at this point in the history
Clang's v2 output appears to be missing a key DW_AT_type attribute,
and this causes the "max" of the unsigned enum to appear as -1 instead
of "max" aka 3.

```
(BitfieldStruct) $0 = {
  signed_min = min
  signed_other = -1
  signed_max = max
  unsigned_min = min
  unsigned_other = 1
  unsigned_max = -1
}
```

Test added by llvm#96202.
  • Loading branch information
DavidSpickett authored and aaryanshukla committed Jul 14, 2024
1 parent 35816d4 commit a9af412
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@


class TestBitfieldEnum(TestBase):
# clang's DWARF v2 output is missing DW_AT_type which causes unsigned_max to
# appear as -1 instead of the "max" enumerator, whose value is 3.
@skipIf(dwarf_version=["<", "3"], compiler="clang")
def test_bitfield_enums(self):
self.build()

Expand Down

0 comments on commit a9af412

Please sign in to comment.