Files
swift-mirror/test/DebugInfo/generic_enum_closure.swift
Duncan Exon Smith c6d42db070 Adapt to MD* => DI* renaming of debug info types
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE).  This is the
final step of rdar://problem/20434113.



Swift SVN r27925
2015-04-29 21:40:21 +00:00

20 lines
749 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
struct __CurrentErrno {}
struct CErrorOr<T>
{
var value : T?
init(x : __CurrentErrno) {
// CHECK: define hidden void @_TFV20generic_enum_closure8CErrorOrCU__fMGS0_Q__FT1xVS_14__CurrentErrno_GS0_Q__
// CHECK-NOT: define
// This is a SIL-level debug_value_addr instruction.
// CHECK: call void @llvm.dbg.value({{.*}}, metadata ![[SELF:.*]], metadata !{{[0-9]+}})
// CHECK-DAG: ![[SELF]] = !DILocalVariable(tag: DW_TAG_auto_variable, name: "self",{{.*}} type: !"_TtGV20generic_enum_closure8CErrorOrQq_S0__"
value = .None
}
func isError() -> Bool {
assert(value != nil, "the object should not contain an error")
return false
}
}