forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bbentry-location.swift
31 lines (30 loc) · 1.03 KB
/
bbentry-location.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
// REQUIRES: OS=ios
// REQUIRES: objc_interop
// RUN: %target-swift-frontend -emit-ir -g %s -o - | FileCheck %s
import UIKit
@available(iOS, introduced=8.0)
class ActionViewController
{
var imageView: UIImageView!
func viewDidLoad(inputItems: [AnyObject]) {
for item: AnyObject in inputItems {
let inputItem = item as! NSExtensionItem
for provider: AnyObject in inputItem.attachments! {
let itemProvider = provider as! NSItemProvider
// CHECK: load {{.*}}selector
// CHECK:; <label>{{.*}} ; preds = %{{[0-9]+}}
// CHECK: @swift_allocObject({{.*}}, !dbg ![[DBG:[0-9]+]]
// Test that the location is reset at the entry of a new basic block.
// CHECK: ![[DBG]] = {{.*}}line: 0
if itemProvider.hasItemConformingToTypeIdentifier("") {
weak var weakImageView = self.imageView
itemProvider.loadItemForTypeIdentifier("", options: nil,
completionHandler: { (image, error) in
if let imageView = weakImageView {
}
})
}
}
}
}
}