Debian Codegraph @

clang/test/CodeGenCXX/tmp-md-nodes1.cpp

raw
1 // REQUIRES: asserts
2 // RUN: %clang_cc1 -O0 -triple %itanium_abi_triple -debug-info-kind=limited -emit-llvm %s -o - | \
3 // RUN: FileCheck %s
4
5 // Trigger GenerateVarArgsThunk.
6 // RUN: %clang_cc1 -O0 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-llvm %s -o - | \
7 // RUN: FileCheck %s
8
9 // Check that retainedNodes are properly maintained at function cloning.
10 // RUN: %clang_cc1 -O1 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-llvm %s -o - | \
11 // RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DI
12
13 // This test simply checks that the varargs thunk is created. The failing test
14 // case asserts.
15
16 struct Alpha {
17 virtual void bravo(...);
18 };
19 struct Charlie {
20 virtual ~Charlie() {}
21 };
22 struct CharlieImpl : Charlie, Alpha {
23 void bravo(...) {}
24 } delta;
25
26 // CHECK: define {{.*}} void @_ZThn{{[48]}}_N11CharlieImpl5bravoEz(
27
28 // CHECK-DI: distinct !DISubprogram({{.*}}, linkageName: "_ZN11CharlieImpl5bravoEz", {{.*}}, retainedNodes: [[RN1:![0-9]+]]
29 // A non-empty retainedNodes list of original DISubprogram.
30 // CHECK-DI: [[RN1]] = !{!{{.*}}}
31
32 // CHECK-DI: distinct !DISubprogram({{.*}}, linkageName: "_ZN11CharlieImpl5bravoEz", {{.*}}, retainedNodes: [[EMPTY:![0-9]+]]
33 // An empty retainedNodes list of cloned DISubprogram.
34 // CHECK-DI: [[EMPTY]] = !{}