2017-05-29 13:38:20 +08:00
|
|
|
// RUN: %clang_cc1 %s -debug-info-kind=limited -triple %itanium_abi_triple -fno-use-cxa-atexit -S -disable-O0-optnone -emit-llvm -o - \
|
2012-10-25 18:18:50 +08:00
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-NOKEXT
|
2017-05-29 13:38:20 +08:00
|
|
|
// RUN: %clang_cc1 %s -debug-info-kind=limited -triple %itanium_abi_triple -fno-use-cxa-atexit -fapple-kext -S -disable-O0-optnone -emit-llvm -o - \
|
2012-10-25 18:18:50 +08:00
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-KEXT
|
2019-04-25 06:45:44 +08:00
|
|
|
// RUN: %clang_cc1 %s -gcodeview -debug-info-kind=limited -triple x86_64-windows-msvc -fno-use-cxa-atexit -S -disable-O0-optnone -emit-llvm -o - \
|
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-MSVC
|
2012-10-25 18:18:50 +08:00
|
|
|
|
|
|
|
class A {
|
2019-04-25 06:45:44 +08:00
|
|
|
public:
|
|
|
|
A();
|
|
|
|
A(int x);
|
|
|
|
virtual ~A();
|
2012-10-25 18:18:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
A glob;
|
|
|
|
A array[2];
|
|
|
|
|
|
|
|
void foo() {
|
|
|
|
static A stat;
|
|
|
|
}
|
|
|
|
|
2019-04-25 06:45:44 +08:00
|
|
|
template <typename T>
|
|
|
|
struct FooTpl {
|
|
|
|
template <typename U>
|
|
|
|
static A sdm_tpl;
|
|
|
|
};
|
|
|
|
template <typename T>
|
|
|
|
template <typename U>
|
|
|
|
A FooTpl<T>::sdm_tpl(sizeof(U) + sizeof(T));
|
|
|
|
template A FooTpl<int>::sdm_tpl<int>;
|
|
|
|
|
2019-09-06 04:12:20 +08:00
|
|
|
// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init",{{.*}} line: 15,{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-NOKEXT: !DISubprogram(name: "__dtor_glob",{{.*}} line: 15,{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init.1",{{.*}} line: 16,{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_array_dtor",{{.*}} line: 16,{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-NOKEXT: !DISubprogram(name: "__dtor_array",{{.*}} line: 16,{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-NOKEXT: !DISubprogram(name: "__dtor__ZZ3foovE4stat",{{.*}} line: 19,{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
2018-11-29 05:18:07 +08:00
|
|
|
// CHECK-NOKEXT: !DISubprogram({{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
2012-10-25 18:18:50 +08:00
|
|
|
|
2018-11-29 05:18:07 +08:00
|
|
|
// CHECK-KEXT: !DISubprogram({{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
2019-04-25 06:45:44 +08:00
|
|
|
|
2019-09-06 04:12:20 +08:00
|
|
|
// CHECK-MSVC: !DISubprogram(name: "`dynamic initializer for 'glob'",{{.*}} line: 15,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-MSVC: !DISubprogram(name: "`dynamic atexit destructor for 'glob'",{{.*}} line: 15,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-MSVC: !DISubprogram(name: "`dynamic initializer for 'array'",{{.*}} line: 16,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-MSVC: !DISubprogram(name: "__cxx_global_array_dtor",{{.*}} line: 16,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-MSVC: !DISubprogram(name: "`dynamic atexit destructor for 'array'",{{.*}} line: 16,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-MSVC: !DISubprogram(name: "`dynamic atexit destructor for 'stat'",{{.*}} line: 19,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
2019-04-25 06:45:44 +08:00
|
|
|
|
|
|
|
// MSVC does weird stuff when templates are involved, so we don't match exactly,
|
|
|
|
// but these names are reasonable.
|
|
|
|
// FIXME: These should not be marked DISPFlagLocalToUnit.
|
2019-09-06 04:12:20 +08:00
|
|
|
// CHECK-MSVC: !DISubprogram(name: "FooTpl<int>::`dynamic initializer for 'sdm_tpl<int>'",{{.*}} line: 29,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
|
|
// CHECK-MSVC: !DISubprogram(name: "FooTpl<int>::`dynamic atexit destructor for 'sdm_tpl<int>'",{{.*}} line: 29,{{.*}}: DISPFlagLocalToUnit | DISPFlagDefinition
|