Skip to content

[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

Merged
merged 2 commits into from
Jan 7, 2020
Merged

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Jan 3, 2020

In preparation for installing some stable paths infrastructure here,
hide access to the array of top-level decls.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 3, 2020

@swift-ci please smoke test and merge

@davidungar davidungar self-requested a review January 3, 2020 19:49
@davidungar
Copy link
Contributor

Nice!

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@slavapestov slavapestov left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 3, 2020

Urf, need LLDB patches.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 3, 2020

swiftlang/llvm-project#525

@swift-ci smoke test

In preparation for installing some stable paths infrastructure here,
hide access to the array of top-level decls.
@CodaFi CodaFi force-pushed the absolutely-path-ological branch from 7bd03f0 to 96b3b9f Compare January 3, 2020 22:14
@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 3, 2020

swiftlang/llvm-project#525

@swift-ci smoke test

CodaFi added a commit to CodaFi/llvm-project that referenced this pull request Jan 6, 2020
@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 6, 2020

swiftlang/llvm-project#525

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

CodaFi commented Jan 6, 2020

Installed a workaround for LLDB and filed rdar://58355191 about removing it on their end.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 6, 2020

swiftlang/llvm-project#525

@swift-ci smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented Jan 7, 2020

⛵️

@CodaFi CodaFi merged commit 19f0d52 into swiftlang:master Jan 7, 2020
@CodaFi CodaFi deleted the absolutely-path-ological branch January 7, 2020 02:48
adrian-prantl pushed a commit to swiftlang/llvm-project that referenced this pull request Jan 8, 2020
Supports swiftlang/swift#28995

(cherry picked from commit f64e25b)
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.

3 participants