diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/CodeGenCXX/debug-info-class.cpp | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/CodeGenCXX/debug-info-class.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-class.cpp | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/test/CodeGenCXX/debug-info-class.cpp b/test/CodeGenCXX/debug-info-class.cpp index 062227a..df24926 100644 --- a/test/CodeGenCXX/debug-info-class.cpp +++ b/test/CodeGenCXX/debug-info-class.cpp @@ -1,24 +1,48 @@ -// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s struct foo; -void func(foo *f) { // CHECK: DW_TAG_structure_type +void func(foo *f) { } class bar; -void func(bar *f) { // CHECK: DW_TAG_class_type +void func(bar *f) { } union baz; -void func(baz *f) { // CHECK: DW_TAG_union_type +void func(baz *f) { } -struct A { // CHECK: DW_TAG_structure_type + +class B { +public: + virtual ~B(); +}; +struct A { int one; - static const int HdrSize = 52; // CHECK: HdrSize + static const int HdrSize = 52; int two; A() { int x = 1; } }; -class B { // CHECK: DW_TAG_class_type -}; -int main() { - A a; + + +int main(int argc, char **argv) { B b; + if (argc) { + A a; + } + return 0; } + +// RUN: %clang -target x86_64-unknown_unknown -emit-llvm -g -S %s -o - | FileCheck %s +// RUN: %clang -target i686-cygwin -emit-llvm -g -S %s -o - | FileCheck %s +// RUN: %clang -target armv7l-unknown-linux-gnueabihf -emit-llvm -g -S %s -o - | FileCheck %s + +// CHECK: invoke {{.+}} @_ZN1BD1Ev(%class.B* %b) +// CHECK-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]] +// CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]] +// CHECK: DW_TAG_structure_type ] [foo] +// CHECK: DW_TAG_class_type ] [bar] +// CHECK: DW_TAG_union_type ] [baz] +// CHECK: DW_TAG_structure_type ] [A] +// CHECK: HdrSize +// CHECK: DW_TAG_class_type ] [B] +// CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ] +// CHECK: ![[EXCEPTLOC]] = metadata !{i32 31, +// CHECK: ![[RETLOC]] = metadata !{i32 30, |