Files
swift-mirror/test/DebugInfo/DynamicSelf.swift
Adrian Prantl 0fac43e11f Adapt to upstream LLVM changes.
<rdar://problem/25949511+25962000>

(cherry picked from commit df9dfac609d17cd26d6107f17024c937b1b5b1a2)
2016-05-13 22:04:00 -07:00

25 lines
741 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s
class C {
let n : Int64
required init (number i :Int64) {
self.n = i
}
}
extension C {
class func Factory() -> Self {
// Currently we emit the static type C for r.
// CHECK: ![[BASE:.*]] = !DICompositeType({{.*}}identifier: "_TtC11DynamicSelf1C"
// CHECK: !DILocalVariable(name: "r",
// CHECK-SAME: line: [[@LINE+4]], type: ![[SELFTY:[0-9]+]])
// CHECK: ![[SELFTY]] = !DIDerivedType(tag: DW_TAG_typedef,
// CHECK-SAME: name: "_TtDC11DynamicSelf1C",
// CHECK-SAME: baseType: ![[BASE]])
let r = self.init(number: 0)
return r
}
}
let MoreDesignPatterns = C.Factory