Files
swift-mirror/test/DebugInfo/LoadableByAddress.swift
Michael Ilseman 3be2faf5d3 [String] Initial implementation of 64-bit StringGuts.
Include the initial implementation of _StringGuts, a 2-word
replacement for _LegacyStringCore. 64-bit Darwin supported, 32-bit and
Linux support in subsequent commits.
2018-01-21 12:32:26 -08:00

28 lines
710 B
Swift

// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o - | %FileCheck %s
// REQUIRES: CPU=x86_64
public struct Continuation<A> {
private let magicToken = "Hello World"
fileprivate let f: (() -> A)?
private let _makeMeBigger = 0
public func run() {}
}
public typealias ContinuationU = Continuation<()>
// CHECK: %2 = alloca %T1A12ContinuationV, align 8
// CHECK-NEXT: call void @llvm.dbg.declare(metadata %T1A12ContinuationV* %2,
// CHECK-SAME: metadata ![[X:.*]], metadata !DIExpression())
// CHECK: ![[X]] = !DILocalVariable(name: "x",
public func f<A>(_ xs: [Continuation<A>]) -> (() -> A?) {
return {
for x in xs {
x.run()
}
return nil
}
}