[SILProfiler] Do not set up a profiler for a function twice

rdar://58861159
This commit is contained in:
Vedant Kumar
2020-01-27 12:04:47 -08:00
parent 509ffb3b09
commit dfdb2e57b9
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
// 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
struct Foo {
var a = false
// CHECK: sil_coverage_map {{.*}}// variable initialization expression of coverage_struct.Foo.b : Swift.Bool
// CHECK-NEXT: [[@LINE+1]]:11 -> [[@LINE+3]]:6 : 0
let b = {
false
}()
}