mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SILProfiler] Do not set up a profiler for a function twice
rdar://58861159
This commit is contained in:
11
test/Profiler/coverage_struct.swift
Normal file
11
test/Profiler/coverage_struct.swift
Normal 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
|
||||
}()
|
||||
}
|
||||
Reference in New Issue
Block a user