xref: /llvm-project/clang/test/CodeGenCXX/pragma-pack-2.cpp (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.2 %s -emit-llvm -o - | FileCheck %s
2 
3 struct FOO {
4 	unsigned int x;
5 };
6 
7 #pragma pack(push, 2)
8 
9 // CHECK: %struct.BAR = type <{ %struct.FOO, i8, i8 }>
10 struct BAR : FOO {
11 	char y;
12 };
13 
14 #pragma pack(pop)
15 
f(BAR x)16 BAR f(BAR x) {
17   return x;
18 }
19