diff options
author | Greg Clayton <gclayton@apple.com> | 2016-04-22 23:14:35 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-04-22 23:14:35 +0000 |
commit | cae0855a62d2dc09fddc581f7a52d10c43b17571 (patch) | |
tree | a81b57f09ec7b70aafcbab97bfbbd74608ebc264 /lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py | |
parent | 6010f97ee66fdc11f8f85b46c8e24f440ab8c72e (diff) | |
download | bcm5719-llvm-cae0855a62d2dc09fddc581f7a52d10c43b17571.tar.gz bcm5719-llvm-cae0855a62d2dc09fddc581f7a52d10c43b17571.zip |
DWARF layout for bitfields is wrong when the bit offset is negative.
Some older versions of clang emitted bit offsets that were negative and these bitfields would have their bitfield-ness stripped off and it would cause a clang assertion in clang assertions were enabled. I updated the bitfield C test to make sure we don't regress.
<rdar://problem/21082998>
llvm-svn: 267248
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py b/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py index 60c1c0992d2..0afec0a3c1a 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -96,6 +96,14 @@ class BitfieldsTestCase(TestBase): self.expect("expr (more_bits.d)", VARIABLES_DISPLAYED_CORRECTLY, substrs = ['uint8_t', '\\0']) + self.expect("expr (packed.a)", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ['char', "'a'"]) + self.expect("expr (packed.b)", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ['uint32_t', "10"]) + self.expect("expr/x (packed.c)", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ['uint32_t', "7112233"]) + + @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) def test_and_python_api(self): |