diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/CodeGenCXX/class-layout.cpp | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/CodeGenCXX/class-layout.cpp')
-rw-r--r-- | test/CodeGenCXX/class-layout.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp index 9303bda..6675b49 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; +} |