-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Hide SourceFile::Decls #28995
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
[NFC] Hide SourceFile::Decls #28995
Conversation
@swift-ci please smoke test and merge |
Nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup!
/// The list of top-level declarations in the source file. | ||
std::vector<Decl*> Decls; | ||
/// Appends the given declaration to the end of the top-level decls list. | ||
void addTopLevelDecl(Decl *d) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually this should set them all in one shot so that anything depending on getTopLevelDecls() is immutable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LLDB is going to be the last bastion of mutations here...
Urf, need LLDB patches. |
@swift-ci smoke test |
In preparation for installing some stable paths infrastructure here, hide access to the array of top-level decls.
7bd03f0
to
96b3b9f
Compare
@swift-ci smoke test |
@swift-ci smoke test |
SwiftASTManipulator is installing declarations in the wrong order, and currently fails a REPL test if the right API is used. rdar://58355191 is tracking the removal of this entrypoint.
Installed a workaround for LLDB and filed rdar://58355191 about removing it on their end. |
@swift-ci smoke test |
⛵️ |
Supports swiftlang/swift#28995 (cherry picked from commit f64e25b)
In preparation for installing some stable paths infrastructure here,
hide access to the array of top-level decls.