[cfe-commits] r138090 - /cfe/trunk/test/CodeGenCXX/2009-09-09-packed-layout.cpp
Eric Christopher
echristo at apple.com
Fri Aug 19 14:24:41 PDT 2011
Author: echristo
Date: Fri Aug 19 16:24:41 2011
New Revision: 138090
URL: http://llvm.org/viewvc/llvm-project?rev=138090&view=rev
Log:
Migrate 2009-09-09-packed-layout.cpp test from llvm/test/FrontendC++.
Added:
cfe/trunk/test/CodeGenCXX/2009-09-09-packed-layout.cpp
Added: cfe/trunk/test/CodeGenCXX/2009-09-09-packed-layout.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2009-09-09-packed-layout.cpp?rev=138090&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2009-09-09-packed-layout.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2009-09-09-packed-layout.cpp Fri Aug 19 16:24:41 2011
@@ -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;
More information about the cfe-commits
mailing list