1 // RUN: %clang_cc1 -x c++ -std=c++11 %s -triple x86_64-unknown-linux-gnu -main-file-name def-ctors.cpp -o - -emit-llvm -fprofile-instrument=clang | FileCheck --check-prefix=PGOGEN %s
3 // RUN: %clang_cc1 -x c++ -std=c++11 %s -triple x86_64-unknown-linux-gnu -main-file-name def-ctors.cpp -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping | FileCheck --check-prefix=COVMAP %s
8 Base(const struct Base
&b2
) {}
11 struct Derived
: public Base
{
12 Derived(const Derived
&) = default;
13 // PGOGEN-DAG: define {{.*}}@_ZN7DerivedC2ERKS_
14 // PGOGEN-DAG: %pgocount = load {{.*}} @__profc__ZN7DerivedC2ERKS_
15 // PGOGEN-DAG: {{.*}}add{{.*}}%pgocount, 1
16 // PGOGEN-DAG: store{{.*}}@__profc__ZN7DerivedC2ERKS_
18 // PGOGEN-DAG: define {{.*}}@_ZN7DerivedC2Ev
19 // PGOGEN-DAG: %pgocount = load {{.*}} @__profc__ZN7DerivedC2Ev
20 // PGOGEN-DAG: {{.*}}add{{.*}}%pgocount, 1
21 // PGOGEN-DAG: store{{.*}}@__profc__ZN7DerivedC2Ev
23 // Check that coverage mapping has 5 function records including
24 // the defaulted Derived::Derived(const Derived), and Derived::Derived()
26 // COVMAP: section "__llvm_covfun", comdat
27 // COVMAP: section "__llvm_covfun", comdat
28 // COVMAP: section "__llvm_covfun", comdat
29 // COVMAP: section "__llvm_covfun", comdat
30 // COVMAP: section "__llvm_covfun", comdat
31 // COVMAP: @__llvm_coverage_mapping = {{.*}} { { i32, i32, i32, i32 }