1 // RUN: %clang -x c++ -fno-exceptions  -std=c++11 -fuse-ld=gold -fprofile-instr-generate -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 -filename-equivalence 2>&1 | FileCheck %s
5 
6 struct Base {
7   int B;
8   Base(int B_) : B(B_) {}
9   ~Base() {}
10 };
11 
12 struct Derived : public Base {
13   Derived(int K) : Base(K), I(K) {}
14   ~Derived() = default; // CHECK:  2| [[@LINE]]|  ~Derived() = default;
15   int I;
16   int getI() { return I; }
17 };
18 
19 int g;
20 int main() {
21   Derived dd(10);
22   Derived dd2(120);
23   g = dd2.getI() + dd.getI();
24   return 0;
25 }
26