[Lldb-commits] [lldb] r204207 - Work around clang's ignoring __attribute ( align(16) ) in this test case.

Jim Ingham jingham at apple.com
Tue Mar 18 17:50:09 PDT 2014


Author: jingham
Date: Tue Mar 18 19:50:08 2014
New Revision: 204207

URL: http://llvm.org/viewvc/llvm-project?rev=204207&view=rev
Log:
Work around clang's ignoring __attribute ( align(16) ) in this test case.

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

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=204207&r1=204206&r2=204207&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Tue Mar 18 19:50:08 2014
@@ -152,7 +152,12 @@ class BitfieldsTestCase(TestBase):
         self.DebugSBValue(bits)
         self.assertTrue(bits.GetTypeName() == 'Bits', "bits.GetTypeName() == 'Bits'");
         self.assertTrue(bits.GetNumChildren() == 10, "bits.GetNumChildren() == 10");
-        self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32");
+        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");
 
         # 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





More information about the lldb-commits mailing list