Files
swift-mirror/test/DebugInfo/anonymous.swift
Adrian Prantl e574aa765f Don't emit shadow copies for anonymous variables.
Switch statements generate at least one anonymous match variable per
case, which consumes both a lot of stack space and an explosion of
range extension depencies due to the way case statements are scoped.

rdar://problem/34326355
2017-11-16 10:41:40 -08:00

11 lines
336 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s
// CHECK: !DILocalVariable(name: "x4", arg: 4
// CHECK: !DILocalVariable(name: "_0", arg: 1
// CHECK: !DILocalVariable(name: "_1", arg: 2
// CHECK: !DILocalVariable(name: "_2", arg: 3
public func fourth<T>(_: T, _: T, _: T, x4 : T) -> T {
return x4
}