mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialize local types and provide a lookup API
rdar://problem/18295292 Locally scoped type declarations were previously not serialized into the module, which meant that the debugger couldn't reason about the structure of instances of those types. Introduce a new mangling for local types: [file basename MD5][counter][identifier] This allows the demangle node's data to be used directly for lookup without having to backtrack in the debugger. Local decls are now serialized into a LOCAL_TYPE_DECLS table in the module, which acts as the backing hash table for looking up [file basename MD5][counter][identifier] -> DeclID mappings. New tests: * swift-ide-test mode for testing the demangle/lookup/mangle lifecycle of a module that contains local decls * mangling * module merging with local decls Swift SVN r24426
This commit is contained in:
@@ -3,7 +3,7 @@ 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]
|
||||
// CHECK: \00_TFF16nested_functions5outerFSiSiL33_C327CA4691633C3CAC5D0746F943AABD_5innerfSiSi\00[[@LINE+1]]\000\001\000\000\000\000\00[[@LINE+1]]", !1, !24, !31, null, i64 (i64, i64)* @_TFF16nested_functions5outerFSiSiL33_C327CA4691633C3CAC5D0746F943AABD_5innerfSiSi, null, null, !2} ; [ DW_TAG_subprogram ] [line [[@LINE+1]]] [def] [inner]
|
||||
func inner(b: Int) -> Int {
|
||||
return a+b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user