Commits

Adrian Prantl committed c9927f66f0e
Serialize debug scope and location info in the SIL assembler language. At the moment it is only possible to test the effects that SIL optimization passes have on debug information by observing the effects of a full .swift -> LLVM IR compilation. This change enable us to write targeted testcases for single SIL optimization passes. The new syntax is as follows: sil-scope-ref ::= 'scope' [0-9]+ sil-scope ::= 'sil_scope' [0-9]+ '{' sil-loc 'parent' scope-parent ('inlined_at' sil-scope-ref )? '}' scope-parent ::= sil-function-name ':' sil-type scope-parent ::= sil-scope-ref sil-loc ::= 'loc' string-literal ':' [0-9]+ ':' [0-9]+ Each instruction may have a debug location and a SIL scope reference at the end. Debug locations consist of a filename, a line number, and a column number. If the debug location is omitted, it defaults to the location in the SIL source file. SIL scopes describe the position inside the lexical scope structure that the Swift expression a SIL instruction was generated from had originally. SIL scopes also hold inlining information. <rdar://problem/22706994>