Skip to content

[sil] Complement ValueBase::getParentBB() with ValueBase::get{Function,Module}() #5414

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
Oct 23, 2016

Conversation

gottesmm
Copy link
Contributor

[sil] Complement ValueBase::getParentBB() with ValueBase::get{Function,Module}()

These APIs work just like getParentBB does, namely they attempt to cast
self to either SILInstruction/SILArgument and if the instance is one of
those classes, using the APIs on said classes to get the relevant
Function or Module. If the dynamic casts fail, then nullptr is returned.

This is just missing API.

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

…n,Module}().

These APIs work just like getParentBB does, namely they attempt to cast
self to either SILInstruction/SILArgument and if the instance is one of
those classes, using the APIs on said classes to get the relevant
Function or Module. If the dynamic casts fail, then nullptr is returned.
@gottesmm gottesmm force-pushed the quick_utility_method branch from 45e69f8 to 3eaa25b Compare October 23, 2016 21:47
@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 4779907 into swiftlang:master Oct 23, 2016
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