- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathcoverage_irgen.swift
20 lines (16 loc) · 778 Bytes
/
coverage_irgen.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -emit-sil -o - -module-name=irgen | %FileCheck %s --check-prefix=SIL
// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -emit-ir -o - -module-name=irgen | %FileCheck %s --check-prefix=IR
// IR-NOT: __llvm_coverage_names
// IR-NOT: __profn
// SIL: sil hidden @$s5irgen2f1yyF
// SIL: increment_profiler_counter 0, "{{.*}}coverage_irgen.swift:{{.*}}$s5irgen2f1yyF"
internalfunc f1(){}
// SIL: sil private @$s5irgen2f2[[F2HASH:[_a-zA-Z0-9]+]]
// SIL: increment_profiler_counter 0, "{{.*}}coverage_irgen.swift:$s5irgen2f2[[F2HASH]]"
privatefunc f2(){}
// SIL: sil @$s5irgen2f3yyF
// SIL: increment_profiler_counter 0, "$s5irgen2f3yyF"
publicfunc f3(){
f1()
f2()
}