@@ -5,27 +5,6 @@ import CoreGraphics
5
5
6
6
// REQUIRES: OS=macosx
7
7
8
- // CHECK: [[SWITCHTABLE:@.*]] = private unnamed_addr constant [8 x i64] [i64 0, i64 12, i64 23, i64 34, i64 45, i64 55, i64 67, i64 71]
9
-
10
- // CHECK-LABEL: define i64 {{.*}}testEnums{{.*}} {
11
- public func testEnums( _ model: CGColorSpaceModel ) -> Int {
12
- switch model {
13
- case . unknown : return 0
14
- case . monochrome : return 12
15
- case . rgb : return 23
16
- case . cmyk : return 34
17
- case . lab : return 45
18
- case . deviceN : return 55
19
- case . indexed : return 67
20
- case . pattern : return 71
21
-
22
- default : return 0
23
- }
24
- // CHECK: [[GEP:%.+]] = getelementptr inbounds [8 x i64], [8 x i64]* [[SWITCHTABLE]], i64 0, i64 %{{.*}}
25
- // CHECK: [[LOAD:%.+]] = load i64, i64* [[GEP]], align 8
26
- // CHECK: ret i64 [[LOAD]]
27
- }
28
-
29
8
// CHECK-LABEL: define void {{.*}}rotationAround{{.*}} {
30
9
// Get a transform that will rotate around a given offset
31
10
public func rotationAround( offset: CGPoint , angle: CGFloat ,
@@ -113,8 +92,10 @@ public func testRenames(transform: CGAffineTransform, context: CGContext,
113
92
// CHECK: call void @CGContextTranslateCTM(%struct.CGContext* [[CONTEXT]], double {{1\.0+.*}}, double {{1\.0+.*}})
114
93
115
94
context. clip ( to: rect)
95
+ context. clip ( to: & rect, count: 2 )
116
96
context. clip ( to: rect, mask: image)
117
97
// CHECK: call void @CGContextClipToRect(%struct.CGContext* [[CONTEXT]], %struct.CGRect* byval nonnull align 8 %{{.*}})
98
+ // CHECK: call void @CGContextClipToRects(%struct.CGContext* [[CONTEXT]], %struct.CGRect* nonnull %{{.*}}, i64 2)
118
99
// CHECK: call void @CGContextClipToMask(%struct.CGContext* [[CONTEXT]], %struct.CGRect* byval nonnull align 8 %{{.*}}, %struct.CGImage* %{{.*}})
119
100
120
101
var slice = CGRect . zero
@@ -123,7 +104,7 @@ public func testRenames(transform: CGAffineTransform, context: CGContext,
123
104
from: edge)
124
105
assert ( ( slice, remainder) == rect. divided ( atDistance: CGFloat ( 2.0 ) ,
125
106
from: edge) )
126
- // CHECK: call void @CGRectDivide(%struct.CGRect* byval nonnull align 8 %{{.*}}, %struct.CGRect* nonnull %{{.*}} , %struct.CGRect* nonnull %{{.*}} , double {{2\.0+.*}}, i32 %{{.*}})
107
+ // CHECK: call void @CGRectDivide(%struct.CGRect* byval nonnull align 8 %{{.*}}, %struct.CGRect* nonnull %slice , %struct.CGRect* nonnull %remainder , double {{2\.0+.*}}, i32 %{{.*}})
127
108
//
128
109
// CHECK: ret void
129
110
}
0 commit comments