xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/pragma-pack-2.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.2 %s -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc // <rdar://problem/10551376>
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc struct FOO {
5*f4a2713aSLionel Sambuc 	unsigned int x;
6*f4a2713aSLionel Sambuc };
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc #pragma pack(push, 2)
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc // CHECK: %struct.BAR = type <{ %struct.FOO, i8, i8 }>
11*f4a2713aSLionel Sambuc struct BAR : FOO {
12*f4a2713aSLionel Sambuc 	char y;
13*f4a2713aSLionel Sambuc };
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc #pragma pack(pop)
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc BAR* x = 0;