File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ static bool haveProfiledAssociatedFunction(SILDeclRef constant) {
551
551
// / Set up the function for profiling instrumentation.
552
552
static void setUpForProfiling (SILDeclRef constant, SILFunction *F,
553
553
ForDefinition_t forDefinition) {
554
- if (!forDefinition)
554
+ if (!forDefinition || F-> getProfiler () )
555
555
return ;
556
556
557
557
ASTNode profiledNode;
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sorted-sil -emit-sil -module-name coverage_struct %s | %FileCheck %s
2
+
3
+ struct Foo {
4
+ var a = false
5
+
6
+ // CHECK: sil_coverage_map {{.*}}// variable initialization expression of coverage_struct.Foo.b : Swift.Bool
7
+ // CHECK-NEXT: [[@LINE+1]]:11 -> [[@LINE+3]]:6 : 0
8
+ let b = {
9
+ false
10
+ } ( )
11
+ }
You can’t perform that action at this time.
0 commit comments