Files
swift-mirror/test/DebugInfo/generic_arg3.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

17 lines
730 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
func apply<Type>(_ T : Type, fn: (Type) -> Type) -> Type { return fn(T) }
public func f<Type>(_ value : Type)
{
// CHECK: define {{.*}}$s12generic_arg31fyyxlFxxXEfU_
// CHECK: call void @llvm.dbg.declare(metadata %swift.opaque** %[[ALLOCA:[^,]+]],
// CHECK-SAME: metadata ![[ARG:.*]], metadata !DIExpression(DW_OP_deref))
// CHECK: store %swift.opaque* %1, %swift.opaque** %[[ALLOCA]], align
// No deref here.
// CHECK: ![[TY:.*]] = !DICompositeType({{.*}}identifier: "$sxD"
// CHECK: ![[ARG]] = !DILocalVariable(name: "arg", arg: 1,
// CHECK-SAME: line: [[@LINE+1]], type: ![[TY]])
apply(value) { arg in return arg }
}