-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[NFC] Spin Off Dependency Tracing Utilities From FrontendTool #34694
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
Conversation
|
@swift-ci smoke test |
davidungar
left a comment
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! I like the constification. There were one or two places where a const reference could maybe be used.
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.
Just a thought: would it work to use a const reference here?
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.
It would. But if the goal is to prevent reassignment, encapsulation is your best bet.
|
@swift-ci smoke test Linux |
T *const does not prevent logically non-const accesses to the underlying data, it merely indicates that the pointer value itself is const. This modifier can be cast off by a copy, so it's not generally what you want here. Switch to const T * instead.
e163a20 to
19e6bee
Compare
|
@swift-ci smoke test |
|
@swift-ci smoke test macOS |
|
⛵ |
This leaves FrontendTool devoid of everything except the high-level entrypoints to functionality in the rest of the compiler stack. Hopefully we can make a later pass and drop a bunch of unused includes...