Skip to content

[sil] When printing out SILFunctions add mangled name after closing '{' in a comment. #5621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2016

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Nov 2, 2016

[sil] When printing out SILFunctions add mangled name after the closing brace of the SILFunction.

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 ''

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

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 2, 2016

@swift-ci Please smoke test and merge

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 3, 2016

@swift-ci Please smoke test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 3, 2016

@swift-ci Please smoke test and merge

…t after the closing brace of the SILFunction.

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
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 3, 2016

@swift-ci Please smoke test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 3, 2016

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit ad2db14 into swiftlang:master Nov 3, 2016
@gottesmm gottesmm deleted the rdar29077869 branch November 3, 2016 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants