xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/2009-09-09-packed-layout.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -triple i386-apple-darwin11 %s -o /dev/null
2*f4a2713aSLionel Sambuc class X {
3*f4a2713aSLionel Sambuc  public:
4*f4a2713aSLionel Sambuc   virtual ~X();
5*f4a2713aSLionel Sambuc   short y;
6*f4a2713aSLionel Sambuc };
7*f4a2713aSLionel Sambuc #pragma pack(push, 1)
8*f4a2713aSLionel Sambuc class Z : public X {
9*f4a2713aSLionel Sambuc  public: enum { foo = ('x') };
10*f4a2713aSLionel Sambuc  virtual int y() const;
11*f4a2713aSLionel Sambuc };
12*f4a2713aSLionel Sambuc #pragma pack(pop)
13*f4a2713aSLionel Sambuc class Y : public X {
14*f4a2713aSLionel Sambuc public: enum { foo = ('y'), bar = 0 };
15*f4a2713aSLionel Sambuc };
16*f4a2713aSLionel Sambuc X x;
17*f4a2713aSLionel Sambuc Y y;
18*f4a2713aSLionel Sambuc Z z;
19