Author: David Spickett
Date: 2024-07-09T14:11:26Z
New Revision: 0ad9d8f279437772d390c7fc6309c09b97406be3

URL: 
https://github.com/llvm/llvm-project/commit/0ad9d8f279437772d390c7fc6309c09b97406be3
DIFF: 
https://github.com/llvm/llvm-project/commit/0ad9d8f279437772d390c7fc6309c09b97406be3.diff

LOG: [lldb][test] Skip bitfield enum tests for DWARF v2 and below

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 #96202.

Added: 
    

Modified: 
    lldb/test/API/commands/expression/bitfield_enums/TestBitfieldEnums.py

Removed: 
    


################################################################################
diff  --git 
a/lldb/test/API/commands/expression/bitfield_enums/TestBitfieldEnums.py 
b/lldb/test/API/commands/expression/bitfield_enums/TestBitfieldEnums.py
index a484b69300e7b..dbe9b9241a9ac 100644
--- a/lldb/test/API/commands/expression/bitfield_enums/TestBitfieldEnums.py
+++ b/lldb/test/API/commands/expression/bitfield_enums/TestBitfieldEnums.py
@@ -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()
 


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to