brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · f39dca3 Raw
35 lines · cpp
1// REQUIRES: asserts2// RUN: %clang_cc1 -O0 -triple %itanium_abi_triple -debug-info-kind=limited -emit-llvm %s -o - | \3// RUN: FileCheck %s4 5// Trigger GenerateVarArgsThunk.6// RUN: %clang_cc1 -O0 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-llvm %s -o - | \7// RUN: FileCheck %s8 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-DI12 13// This test simply checks that the varargs thunk is created. The failing test14// case asserts.15 16struct Alpha {17  virtual void bravo(...);18};19struct Charlie {20  virtual ~Charlie() {}21};22struct 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]] = !{}35