-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.1] Upgrade PCMacro/PlaygroundTransform to support module/file IDs #24811
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
[5.1] Upgrade PCMacro/PlaygroundTransform to support module/file IDs #24811
Conversation
@swift-ci Please test |
Build failed |
Build failed |
|
ea587ad
to
eaec764
Compare
@swift-ci Please test |
Build failed |
CI issue has been fixed. |
Build failed |
Please test with the following PR: @swift-ci Please test OS X platform |
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.
Looks reasonable, but this should go to the master branch first, and then get cherry-picked to the release branch.
lib/Sema/InstrumenterSupport.cpp
Outdated
|
||
// Setup File identifier | ||
StringRef filePath = TypeCheckDC->getParentSourceFile()->getFilename(); | ||
std::string fileName = llvm::sys::path::stem(filePath).str(); |
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.
Here's a better example of not needing to copy, I guess.
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.
Still doing an extra copy! It's not critical but…
8944dbc
to
1b1fcc6
Compare
Please test with the following PR: @swift-ci Please test |
lib/Sema/InstrumenterSupport.cpp
Outdated
|
||
// Setup File identifier | ||
StringRef filePath = TypeCheckDC->getParentSourceFile()->getFilename(); | ||
std::string fileName = llvm::sys::path::stem(filePath).str(); |
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.
Still doing an extra copy! It's not critical but…
This change PCMacro and PlaygroundTransform to return an a moduleID and fileID in addition to the source location information. The Frontend has been changed to run PCMacro and PlaygroundTransform on all input files instead of the main file only. The tests have been updated to conform to these changes with an addition of module and file ID specific tests. The Playgrounds related tests were adjusted to make a module out of the stub interface files since those files should not have PCMacro and PlaygroundTransform applied to them. rdar://problem/50821146
1b1fcc6
to
87e8627
Compare
Please test with the following PR: @swift-ci Please test |
This change PCMacro and PlaygroundTransform to return an a moduleID and
fileID in addition to the source location information. The Frontend has
been changed to run PCMacro and PlaygroundTransform on all input files
instead of the main file only.
The tests have been updated to conform to these changes with an addition
of module and file ID specific tests. The Playgrounds related tests were
adjusted to make a module out of the stub interface files since those
files should not have PCMacro and PlaygroundTransform applied to them.
rdar://problem/50821146