diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-blocks.cpp | 14 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp | 27 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-thunk.cpp | 17 |
3 files changed, 58 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-blocks.cpp b/clang/test/CodeGenCXX/debug-info-blocks.cpp new file mode 100644 index 00000000000..5b20db58280 --- /dev/null +++ b/clang/test/CodeGenCXX/debug-info-blocks.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 %s -gline-tables-only -fblocks -S -emit-llvm -o - | FileCheck %s + +struct A { + A(); + A(const A &); + ~A(); +}; + +void test() { + __block A a; +} + +// CHECK: [ DW_TAG_subprogram ] [line 10] [local] [def] [__Block_byref_object_copy_] +// CHECK: [ DW_TAG_subprogram ] [line 10] [local] [def] [__Block_byref_object_dispose_] diff --git a/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp b/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp new file mode 100644 index 00000000000..bdaf58c8270 --- /dev/null +++ b/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 %s -g -fno-use-cxa-atexit -S -emit-llvm -o - \ +// RUN: | FileCheck %s --check-prefix=CHECK-NOKEXT +// RUN: %clang_cc1 %s -g -fno-use-cxa-atexit -fapple-kext -S -emit-llvm -o - \ +// RUN: | FileCheck %s --check-prefix=CHECK-KEXT + +class A { + public: + A() {} + virtual ~A() {} +}; + +A glob; +A array[2]; + +void foo() { + static A stat; +} + +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line 12] [local] [def] [__cxx_global_var_init] +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line 12] [local] [def] [__dtor_glob] +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line 13] [local] [def] [__cxx_global_var_init1] +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line 13] [local] [def] [__cxx_global_array_dtor] +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line 13] [local] [def] [__dtor_] +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line 16] [local] [def] [__dtor__ZZ3foovE4stat] +// CHECK-NOKEXT: [ DW_TAG_subprogram ] [line {{.*}}] [local] [def] [_GLOBAL__I_a] + +// CHECK-KEXT: [ DW_TAG_subprogram ] [line {{.*}}] [local] [def] [_GLOBAL__D_a] diff --git a/clang/test/CodeGenCXX/debug-info-thunk.cpp b/clang/test/CodeGenCXX/debug-info-thunk.cpp new file mode 100644 index 00000000000..58dd02885ea --- /dev/null +++ b/clang/test/CodeGenCXX/debug-info-thunk.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 %s -g -S -emit-llvm -o - | FileCheck %s + +struct A { + virtual void f(); +}; + +struct B { + virtual void f(); +}; + +struct C : A, B { + virtual void f(); +}; + +void C::f() { } + +// CHECK: [ DW_TAG_subprogram ] [line 15] [def] [_ZThn8_N1C1fEv] |