]> granicus.if.org Git - clang/commitdiff
Add IRGen test case for r179743.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 18 Apr 2013 17:52:10 +0000 (17:52 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 18 Apr 2013 17:52:10 +0000 (17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179777 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/pragma-pack-1.c

index c30a62ac3c4e1dd00509db246fc8c7e434aca5f0..06cbf4c16c0d33724f252e8fad6a29b63bffd63c 100644 (file)
@@ -1,7 +1,33 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s | FileCheck %s
 
 // PR4610
 #pragma pack(4)
 struct ref {
         struct ref *next;
 } refs;
+
+// PR13580
+struct S
+{
+  char a[3];
+#pragma pack(1)
+  struct T
+  {
+    char b;
+    int c;
+  } d;
+#pragma pack()
+  struct T2
+  {
+    char b;
+    int c;
+  } d2;
+} ss;
+
+// CHECK: [[struct_ref:%[a-zA-Z0-9_.]+]] = type <{ [[struct_ref]]* }>
+// CHECK: [[struct_S:%[a-zA-Z0-9_.]+]] = type { [3 x i8], [[struct_T:%[a-zA-Z0-9_.]+]], [[struct_T2:%[a-zA-Z0-9_.]+]] }
+// CHECK: [[struct_T]] = type <{ i8, i32 }>
+// CHECK: [[struct_T2]] = type { i8, i32 }
+
+// CHECK: @refs = common global [[struct_ref]]
+// CHECK: @ss = common global [[struct_S]]