Files
swift-mirror/test/DebugInfo/pcomp.swift
Adrian Prantl 4f11ecc1da Get rid of Int in the debug info tests and preform some general cleanup.
<rdar://problem/20856296> Extinguish 'Int' from DebugInfo tests

Swift SVN r31177
2015-08-12 18:16:43 +00:00

37 lines
646 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
func markUsed<T>(t: T) {}
protocol A {
func x()
}
protocol B {
func y()
}
// CHECK-DAG: _TtP5pcomp1AS_1B_
func f(arg :protocol<A,B>) {
}
protocol SomeProto {
func f() -> Int64
}
class SomeClass : SomeProto {
func f() -> Int64 { return 1 }
}
class SomeOtherClass : SomeClass {
override func f() -> Int64 { return 1 }
}
// This is an indirect value.
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "SomeProto",{{.*}} identifier: "_TtP5pcomp9SomeProto_"
func main() {
var p : SomeProto = SomeOtherClass()
markUsed("\(p.f())")
}