Files
swift-mirror/test/DebugInfo/generic_arg2.swift
Adrian Prantl 936fead1b9 Remove DebugTypeInfo::isImplicitlyIndirect().
I found the corresponding code in LLDB that depended on this hack and
am now removing both. This makes it possible to share the same code
path for top-level archetypes and member types.

rdar://problem/45462765
2018-11-27 16:11:05 -08:00

25 lines
729 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
// CHECK: define hidden swiftcc void @"$s12generic_arg25ClassC3foo{{.*}}, %swift.type* %U
// CHECK: call void @llvm.dbg.declare(metadata %swift.opaque** %y.debug, metadata ![[U:.*]], metadata !DIExpression(DW_OP_deref))
// Make sure there is no conflicting dbg.value for this variable.x
// CHECK-NOT: dbg.value{{.*}}metadata ![[U]]
class Class <T> {
// CHECK: ![[U]] = !DILocalVariable(name: "y", arg: 2{{.*}} line: [[@LINE+1]],
func foo<U>(_ x: T, y: U) {}
func bar(_ x: String, y: Int64) {}
init() {}
}
func main() {
var object: Class<String> = Class()
var x = "hello"
var y : Int64 = 1234
object.bar(x, y: y)
object.foo(x, y: y)
}
main()