Testcase for (llvm-gcc) 81399. Adjust an older
authorDale Johannesen <dalej@apple.com>
Wed, 9 Sep 2009 23:37:46 +0000 (23:37 +0000)
committerDale Johannesen <dalej@apple.com>
Wed, 9 Sep 2009 23:37:46 +0000 (23:37 +0000)
test case to allow for different, functionally
identical output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81400 91177308-0d34-0410-b5e6-96231b3b80d8

test/FrontendC++/2009-06-20-DarwinPPCLayout.cpp
test/FrontendC++/2009-09-09-packed-layout.cpp [new file with mode: 0644]

index eef0e86e2ae5f62a5efd0a693d3b785c72b1142f..dcb2f16a5dc8fe95f2450a5c257ab7e673bcf00c 100644 (file)
@@ -3,8 +3,7 @@
 // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep quux | grep global | grep {struct.bar}
 // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep foo | grep global | grep {struct.SRCFilter::FilterEntry}
 // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.bar} | grep {1 x i32}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.CC} | grep {struct.bar}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.bar} | grep {1 x i32}
+// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.CC} | grep {struct.payre<KBFP,float*} | grep {.base.32} | grep {1 x i32}
 // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.SRCFilter::FilterEntry} | not grep {1 x i32}
 // XFAIL: *
 // XTARGET: powerpc-apple-darwin
@@ -30,3 +29,4 @@ class CC ccc;
 
 struct bar { KBFP x; float* y;};          // 16 bytes
 struct bar quux;
+
diff --git a/test/FrontendC++/2009-09-09-packed-layout.cpp b/test/FrontendC++/2009-09-09-packed-layout.cpp
new file mode 100644 (file)
index 0000000..a569f9f
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgxx -S -m32 -emit-llvm %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;