File: coverage_curry.swift

package info (click to toggle)
swiftlang 6.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,532 kB
  • sloc: cpp: 9,901,743; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (20 lines) | stat: -rw-r--r-- 776 bytes parent folder | download | duplicates (2)
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:)
}