Files
swift-mirror/test/Profiler/coverage_dead_code_elim_onone.swift
Augusto Noronha 1c4b67afd1 Adapt tests to changes to keep functions for debugger on Onone
Now that we keep many more functions on unoptimized builds, many tests
need to be changed to either:
- Account for function that wasn't being emitted before to being emitted
  now.
- Account for functions that previously were being emitted lazily to
  being emitted eagerly now.
2023-10-06 11:08:10 -07:00

16 lines
787 B
Swift

// RUN: %target-swift-frontend -emit-sil -profile-generate -profile-coverage-mapping -module-name coverage_deadcode %s | %FileCheck %s -check-prefix SIL
// RUN: %target-swift-frontend -emit-ir -profile-generate -profile-coverage-mapping -module-name coverage_deadcode %s | %FileCheck %s -check-prefix IR
// This function needs to be present in the SIL for the mandatory passes,
// and in the IR as it may be used in the debugger, we need to emit its
// coverage map as well.
func unused() -> Int { 5 }
// SIL: sil hidden @$s17coverage_deadcode6unusedSiyF : $@convention(thin) () -> Int
// SIL: sil_coverage_map {{.*}} "$s17coverage_deadcode6unusedSiyF"
// IR: @__covrec
// IR: @__llvm_coverage_mapping
// IR: @__llvm_prf_nm
// IR: define {{.*}} @"$s17coverage_deadcode6unusedSiyF"