mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE). This is the final step of rdar://problem/20434113. Swift SVN r27925
18 lines
495 B
Swift
18 lines
495 B
Swift
// RUN: %target-swift-frontend -parse-stdlib -primary-file %s -emit-ir -g -o - | FileCheck %s
|
|
|
|
import Swift
|
|
// CHECK: define{{.*}}1f
|
|
func f(x : Int) -> Int {
|
|
if x < 23 {
|
|
// CHECK-DAG: call void @llvm.trap(), !dbg ![[LOC1:.*]]
|
|
// CHECK-DAG: ![[LOC1]] = !DILocation(line: [[@LINE+1]],
|
|
Builtin.int_trap()
|
|
}
|
|
if x > 42 {
|
|
// CHECK-DAG: ![[LOC2:.*]] = !DILocation(line: [[@LINE+1]],
|
|
Builtin.int_trap()
|
|
// CHECK-DAG: call void @llvm.trap(), !dbg ![[LOC2]]
|
|
}
|
|
return x
|
|
}
|