Files
swift-mirror/test/Profiler/coverage_non_constructible_enum.swift
Vedant Kumar ab817e83e0 [Profiler] Increment function body count prior to the prolog
This fixes another 'SILBuilder has no valid insertion point' assertion
failure seen when compiling Carthage.

rdar://68759819
2020-09-15 11:09:24 -07:00

15 lines
637 B
Swift

// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sil -module-name coverage_non_constructible_enum %s | %FileCheck %s
// Reduced from Carthage (https://github.com/Carthage/Carthage).
enum NoError: Error, Equatable {
// CHECK-LABEL: static coverage_non_constructible_enum.NoError.== infix
// CHECK: builtin "int_instrprof_increment"
// CHECK: unreachable
// CHECK-LABEL: sil_coverage_map {{.*}} static coverage_non_constructible_enum.NoError.== infix
// CHECK-NEXT: [[@LINE+1]]:54 -> [[@LINE+3]]:4 : 0
static func ==(lhs: NoError, rhs: NoError) -> Bool {
return true
}
}