mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
17 lines
730 B
Swift
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 }
|
|
}
|