File: coverage_curry.swift

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (20 lines) | stat: -rw-r--r-- 776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sil %s | %FileCheck %s
// RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -emit-ir %s

struct S0 {
  init(a: Int, b: Int) { }
  func f1(a: Int, b: Int) -> Int { return a }
}

// CHECK-LABEL: sil_coverage_map {{.*}}// coverage_curry.testS0CurriedInstanceMethods(s0: coverage_curry.S0, a: Swift.Int, b: Swift.Int)
// CHECK-NEXT: [[@LINE+2]]:59 -> [[@LINE+10]]:2 : 0
// CHECK-NEXT: }
func testS0CurriedInstanceMethods(s0: S0, a: Int, b: Int) {
  _ = S0.f1(s0)(a: a, b: a)
  _ = (S0.f1)(s0)(a: a, b: a)
  _ = ((S0.f1))(s0)(a: a, b: a)
  _ = S0.f1(a:b:)(s0)(a, b)
  _ = S0.init(a:b:)(0, 0)
  let f1OneLevel = S0.f1(s0)
  let f1Init = S0.init(a:b:)
}