summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/pragma-pack-3.c
blob: 56a6be3874fab292c78d1780aa4270d958e7dc22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: clang-cc -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X32 %s
// CHECK-X32: %struct.menu = type <{ i8*, i8, i8 }>
// CHECK-X32: %union.command = type <{ i8*, [2 x i8] }>

// RUN: clang-cc -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X64 %s
// CHECK-X64: %struct.menu = type <{ i8*, i8, i8 }>
// CHECK-X64: %union.command = type <{ i8*, [2 x i8] }>

// <rdar://problem/7184250>
#pragma pack(push, 2)
typedef union command {
  void *windowRef;
  struct menu {
    void *menuRef;
    unsigned char menuItemIndex;
  } menu;
} command;

command c;