[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / compiler-rt / test / profile / Linux / coverage_dtor.cpp
blobc91dd42d21d3c54794f20ec654c6f4cd60698cb2
1 // RUN: %clang_profgen -x c++ -fno-exceptions -std=c++11 -fuse-ld=gold -fcoverage-mapping -o %t %s
2 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
3 // RUN: llvm-profdata merge -o %t.profdata %t.profraw
4 // RUN: llvm-cov show %t -instr-profile %t.profdata -path-equivalence=/tmp,%S 2>&1 | FileCheck %s
6 int g = 100;
7 struct Base {
8 int B;
9 Base(int B_) : B(B_) {}
10 ~Base() { g -= B; }
13 struct Derived : public Base {
14 Derived(int K) : Base(K) {}
15 ~Derived() = default; // CHECK: [[@LINE]]| 2| ~Derived() = default;
18 int main() {
20 Derived dd(10);
21 Derived dd2(90);
23 if (g != 0)
24 return 1; // CHECK: [[@LINE]]| 0| return 1;
25 return 0;