Migrate 2009-09-09-packed-layout.cpp test from llvm/test/FrontendC++.

llvm-svn: 138090
This commit is contained in:
Eric Christopher 2011-08-19 21:24:41 +00:00
parent 65534ba4a4
commit 1c241f741e
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// RUN: %clang_cc1 -emit-llvm -triple i386-apple-darwin11 %s -o /dev/null
class X {
public:
virtual ~X();
short y;
};
#pragma pack(push, 1)
class Z : public X {
public: enum { foo = ('x') };
virtual int y() const;
};
#pragma pack(pop)
class Y : public X {
public: enum { foo = ('y'), bar = 0 };
};
X x;
Y y;
Z z;