Files
swift-mirror/test/DebugInfo/DynamicSelf.swift
Erik Eckstein 1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00

25 lines
776 B
Swift

// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %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: "_T011DynamicSelf1CCD"
// CHECK: !DILocalVariable(name: "r",
// CHECK-SAME: line: [[@LINE+4]], type: ![[SELFTY:[0-9]+]])
// CHECK: ![[SELFTY]] = !DIDerivedType(tag: DW_TAG_typedef,
// CHECK-SAME: name: "_T011DynamicSelf1CCXDD",
// CHECK-SAME: baseType: ![[BASE]])
let r = self.init(number: 0)
return r
}
}
let MoreDesignPatterns = C.Factory