aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/class-layout.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-12-05 00:08:52 +0000
committerAnders Carlsson <andersca@mac.com>2010-12-05 00:08:52 +0000
commit560bf12e97773ba19e55382c32f8b64cd8315315 (patch)
tree89599cdb3128405255b6e5d6313c7aaf1713b39a /test/CodeGenCXX/class-layout.cpp
parent860453c4b4768e99d72f5833771c508e6ef00cc6 (diff)
Put each test in class-layout.cpp into a separate namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/class-layout.cpp')
-rw-r--r--test/CodeGenCXX/class-layout.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp
index 9303bdaba8..6675b4963b 100644
--- a/test/CodeGenCXX/class-layout.cpp
+++ b/test/CodeGenCXX/class-layout.cpp
@@ -1,13 +1,19 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
// An extra byte should be allocated for an empty class.
-// CHECK: %struct.A = type { i8 }
-struct A { } a;
+namespace Test1 {
+ // CHECK: %"struct.Test1::A" = type { i8 }
+ struct A { } *a;
+}
-// No need to add tail padding here.
-// CHECK: %struct.B = type { i8*, i32 }
-struct B { void *a; int b; } b;
+namespace Test2 {
+ // No need to add tail padding here.
+ // CHECK: %"struct.Test2::A" = type { i8*, i32 }
+ struct A { void *a; int b; } *a;
+}
-// C should have a vtable pointer.
-// CHECK: %struct.C = type { i32 (...)**, i32 }
-struct C { virtual void f(); int a; } *c;
+namespace Test3 {
+ // C should have a vtable pointer.
+ // CHECK: %"struct.Test3::A" = type { i32 (...)**, i32 }
+ struct A { virtual void f(); int a; } *a;
+}