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

15 lines
453 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
func outer(a: Int) -> Int {
// Inner functions have a linkage name of "closure[0-9]+", but
// their DW_AT_name is preserved.
// CHECK: !DISubprogram(name: "inner", linkageName: "_TFF16nested_functions5outerFSiSiL_5innerfSiSi"
// CHECK-SAME: line: [[@LINE+1]]
func inner(b: Int) -> Int {
return a+b
}
return inner(42)
}