blob: 8a4a039bee20bba33574238422e5558d7a2d8d21 [file] [log] [blame]
Xinliang David Liabf6d972016-02-07 16:31:13 +00001// 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
6struct Base {
7 int B;
8 Base(int B_) : B(B_) {}
9 ~Base() {}
10};
11
12struct Derived : public Base {
Xinliang David Li879e1432016-02-07 20:08:36 +000013 Derived(int K) : Base(K), I(K) {}
14 ~Derived() = default; // CHECK: 2| [[@LINE]]| ~Derived() = default;
Xinliang David Liabf6d972016-02-07 16:31:13 +000015 int I;
Xinliang David Liabf6d972016-02-07 16:31:13 +000016 int getI() { return I; }
17};
18
19int g;
20int main() {
21 Derived dd(10);
22 Derived dd2(120);
23 g = dd2.getI() + dd.getI();
24 return 0;
25}