// RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin9 %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - -triple thumbv7-apple-ios -target-abi apcs-gnu %s | FileCheck %s -check-prefix=CHECK-ARM
// rdar://8823265
// Note that we're declaring global variables with these types,
// triggering both Sema and IRGen struct layout.
ATTR t1;
int s1 = sizeof;
// CHECK: @s1 ={{.*}} global i32 2
// CHECK-ARM: @s1 ={{.*}} global i32 2
ATTR t2;
int s2 = sizeof;
// CHECK: @s2 ={{.*}} global i32 2
// CHECK-ARM: @s2 ={{.*}} global i32 2
ATTR t3;
int s3 = sizeof;
// CHECK: @s3 ={{.*}} global i32 2
// CHECK-ARM: @s3 ={{.*}} global i32 2
ATTR t4;
int s4 = sizeof;
// CHECK: @s4 ={{.*}} global i32 1
// CHECK-ARM: @s4 ={{.*}} global i32 1
ATTR t5;
int s5 = sizeof;
// CHECK: @s5 ={{.*}} global i32 1
// CHECK-ARM: @s5 ={{.*}} global i32 1
ATTR t6;
int s6 = sizeof;
// CHECK: @s6 ={{.*}} global i32 1
// CHECK-ARM: @s6 ={{.*}} global i32 1
ATTR t7;
int s7 = sizeof;
// CHECK: @s7 ={{.*}} global i32 9
// CHECK-ARM: @s7 ={{.*}} global i32 9
ATTR t8;
int s8 = sizeof;
// CHECK: @s8 ={{.*}} global i32 0
// CHECK-ARM: @s8 ={{.*}} global i32 0
ATTR t9;
int s9 = sizeof;
// CHECK: @s9 ={{.*}} global i32 28
// CHECK-ARM: @s9 ={{.*}} global i32 28
ATTR t10;
int s10 = sizeof;
// CHECK: @s10 ={{.*}} global i32 16
// CHECK-ARM: @s10 ={{.*}} global i32 8
// rdar://16041826 - ensure that ms_structs work correctly on a
// !useBitFieldTypeAlignment() target
ATTR t11;
int s11 = sizeof;
// CHECK: @s11 ={{.*}} global i32 12
// CHECK-ARM: @s11 ={{.*}} global i32 12
ATTR t12;
int s12 = sizeof;
// CHECK: @s12 ={{.*}} global i32 4
// CHECK-ARM: @s12 ={{.*}} global i32 4
ATTR t13;
int s13 = sizeof;
// CHECK: @s13 ={{.*}} global i32 4
// CHECK-ARM: @s13 ={{.*}} global i32 4