This ensures that we can write FileCheck patterns that match the end of sil
functions. Just using a FileCheck pattern against a brace is not sufficient in
the context of checking the SIL emitted by SILGen. This is because we could match a
different function's body and match the closing brace against the other
function's end brace.
With this change, one can be specific by checking:
// CHECK: } {{.*}} end sil function '<mangled name>'
The inspiration for this change is rdar://28685236. While updating SILGen tests
for that I have found many instances of SILGen tests pattern matching against
the wrong function bodies. This change will allow me to eliminate these problems
robustly.
rdar://29077869
Allow it to have undef as an operand.
This can happen when NoReturnFolding does RAUW for the instructions that
come after a @noreturn function, replacing the uses of those
instructions in blocks that are unreachable. These instructions end up
getting deleted during diagnose unreachable when we remove the
unreachable code.
Fixes SR-967 / rdar://problem/25882880.