[Lldb-commits] [lldb] r234523 - [TestBitfields] Correct the attribute name to "aligned" in the testcase.

Siva Chandra sivachandra at google.com
Thu Apr 9 11:49:42 PDT 2015


Author: sivachandra
Date: Thu Apr  9 13:49:42 2015
New Revision: 234523

URL: http://llvm.org/viewvc/llvm-project?rev=234523&view=rev
Log:
[TestBitfields] Correct the attribute name to "aligned" in the testcase.

Summary:
This makes all parts of the test pass with Clang and GCC. They are
enabled with this patch.

Test Plan: dotest.py -C <clang|gcc> -p TestBitfields

Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8874

Modified:
    lldb/trunk/test/lang/c/bitfields/TestBitfields.py
    lldb/trunk/test/lang/c/bitfields/main.c

Modified: lldb/trunk/test/lang/c/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/TestBitfields.py?rev=234523&r1=234522&r2=234523&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Thu Apr  9 13:49:42 2015
@@ -35,7 +35,6 @@ class BitfieldsTestCase(TestBase):
     @python_api_test
     @dwarf_test
     @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
-    @expectedFailureGcc # GCC (4.6/4.7) generates incorrect code with unnamed bitfields.
     def test_with_dwarf_and_python_api(self):
         """Use Python APIs to inspect a bitfields variable."""
         self.buildDwarf()
@@ -155,11 +154,7 @@ class BitfieldsTestCase(TestBase):
         self.assertTrue(bits.GetTypeName() == 'Bits', "bits.GetTypeName() == 'Bits'");
         self.assertTrue(bits.GetNumChildren() == 10, "bits.GetNumChildren() == 10");
         test_compiler = self.getCompiler()
-        if "gcc" in test_compiler:
-        # Clang ignores the align attribute, so this structure isn't padded out to 
-        # 32 bytes there as the test author intended.  Suppress this test for clang
-        # till somebody has a chance to go rewrite the test source to be this big portably.
-            self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32");
+        self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32");
 
         # Notice the pattern of int(b1.GetValue(), 0).  We pass a base of 0
         # so that the proper radix is determined based on the contents of the

Modified: lldb/trunk/test/lang/c/bitfields/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/main.c?rev=234523&r1=234522&r2=234523&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/bitfields/main.c (original)
+++ lldb/trunk/test/lang/c/bitfields/main.c Thu Apr  9 13:49:42 2015
@@ -18,7 +18,7 @@ int main (int argc, char const *argv[])
                     : 2, // Unnamed bitfield
                     b3 : 3,
                     : 2, // Unnamed bitfield (this will get removed)
-                    b4 __attribute__ ((align(16))),
+                    b4 __attribute__ ((aligned(16))),
                     b5 : 5,
                     b6 : 6,
                     b7 : 7,





More information about the lldb-commits mailing list