r220032 - D5775: The new test case was missing from the preceding commit.

Artyom Skrobov Artyom.Skrobov at arm.com
Fri Oct 17 03:25:09 PDT 2014


Author: askrobov
Date: Fri Oct 17 05:25:09 2014
New Revision: 220032

URL: http://llvm.org/viewvc/llvm-project?rev=220032&view=rev
Log:
D5775: The new test case was missing from the preceding commit.

Added:
    cfe/trunk/test/Layout/itanium-union-bitfield.cpp

Added: cfe/trunk/test/Layout/itanium-union-bitfield.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Layout/itanium-union-bitfield.cpp?rev=220032&view=auto
==============================================================================
--- cfe/trunk/test/Layout/itanium-union-bitfield.cpp (added)
+++ cfe/trunk/test/Layout/itanium-union-bitfield.cpp Fri Oct 17 05:25:09 2014
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \
+// RUN:            | FileCheck %s
+
+union A {
+  int f1: 3;
+  A();
+};
+
+A::A() {}
+
+union B {
+  int f1: 69;
+  B();
+};
+
+B::B() {}
+
+// CHECK:*** Dumping AST Record Layout
+// CHECK-NEXT:   0 | union A
+// CHECK-NEXT:   0 |   int f1
+// CHECK-NEXT:     | [sizeof=4, dsize=1, align=4
+// CHECK-NEXT:     |  nvsize=1, nvalign=4]
+
+// CHECK:*** Dumping AST Record Layout
+// CHECK-NEXT:   0 | union B
+// CHECK-NEXT:   0 |   int f1
+// CHECK-NEXT:     | [sizeof=16, dsize=9, align=8
+// CHECK-NEXT:     |  nvsize=9, nvalign=8]
+





More information about the cfe-commits mailing list