Files
swift-mirror/test/DebugInfo/nested_functions.swift
Adrian Prantl d8551038fe Upgrade debug info tests to the new LLVM debug metadata format.
Thanks to Duncan for helping out with the upgrading!

Swift SVN r22512
2014-10-04 00:25:27 +00:00

13 lines
469 B
Swift

// RUN: %swift -target x86_64-apple-macosx10.9 %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: \00_TFF16nested_functions5outerFSiSiL_5innerfSiSi\00[[@LINE+1]]\000\001\000\000\000\00{{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [def] {{.*}}[inner]
func inner(b: Int) -> Int {
return a+b
}
return inner(42)
}