mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Instead of creating and destroying a SILProfiler per TopLevelCodeDecl, setup a single profiler for the top-level entry point function, and visit all the TopLevelCodeDecls when mapping regions.
7 lines
395 B
Swift
7 lines
395 B
Swift
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sil -emit-sorted-sil -module-name coverage_toplevel_empty %s | %FileCheck %s
|
|
// RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -emit-ir %s
|
|
|
|
// Make sure we don't emit a coverage map for an empty main file with no
|
|
// top-level code.
|
|
// CHECK-NOT: sil_coverage_map
|