forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iuo_arg.swift
34 lines (30 loc) · 1.09 KB
/
iuo_arg.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s
class CGImageRef {}
class UIImage {
init() {}
var CGImage : CGImageRef? {
get { return self.CGImage }
}
}
class NSDictionary {}
class CIFilter {
init (name: String) {}
}
class MyClass {
// CHECK: define hidden %C7iuo_arg7UIImage* @_TFC7iuo_arg7MyClass11filterImagefTGSQCS_7UIImage_Sb_S1_
func filterImage(image: UIImage!, _ doSomething:Bool) -> UIImage
{
// Test that image is in an alloca, but not an indirect location.
// CHECK: store {{(i32|i64)}} %0, {{(i32|i64)}}* %[[ALLOCA:.*]], align
// CHECK: call void @llvm.dbg.declare(metadata {{(i32|i64)}}* %[[ALLOCA]], metadata ![[IMAGE:.*]], metadata !{{[0-9]+}})
// CHECK: ![[IMAGE]] = !DILocalVariable(name: "image", arg: 1
// CHECK-NOT: flags:
// CHECK-SAME: line: [[@LINE-7]]
// CHECK-NOT: flags:
// CHECK-SAME: ){{$}}
let filter = CIFilter(name: "CIGaussianBlur")
return image
}
}
let a = MyClass()
let img = a.filterImage(UIImage(), true)