mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
instead of using name and decl context. The advantages of this approach are three-fold: - This is necessary to support inlined generic functions. - We can retire the debugger-specific type name manfgling mode for archetypes. - This saves 270kb of debug information in the x86_64 libSwiftCore.dylib alone. <rdar://problem/38306256>
17 lines
725 B
Swift
17 lines
725 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())
|
|
// 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 }
|
|
}
|