-
Notifications
You must be signed in to change notification settings - Fork 341
[clang][ScanDeps] Canonicalize -D and -U flags #8251
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
[clang][ScanDeps] Canonicalize -D and -U flags #8251
Conversation
@swift-ci test |
935ec22
to
9a0c91f
Compare
@swift-ci test Previous version had test issues on Windows, should be fixed now. |
@swift-ci test |
1 similar comment
@swift-ci test |
@swift-ci test llvm |
@swift-ci test linux platform |
9a0c91f
to
9474cf8
Compare
Tests all failed because of unrelated issues. Rebased and trying again. |
@swift-ci test |
@swift-ci test llvm |
@swift-ci test windows platform |
Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we can guarantee a simple analysis of can determine if two flags refer to the same identifier or not. See the comment on `getSimpleMacroName()` for details of what the issues are. Cherry pick of: llvm#82568
9474cf8
to
70bda48
Compare
@swift-ci test |
@swift-ci test llvm |
@swift-ci test windows platform |
1 similar comment
@swift-ci test windows platform |
LLVM Linux test failures are unrelated and already existing. |
I'm told the failing Windows test is flakey, retesting. |
@swift-ci test windows platform |
1 similar comment
@swift-ci test windows platform |
swiftlang/swift#71886 |
Canonicalize
-D
and-U
flags by sorting them and only keeping the last instance of a given name.This optimization will only fire if all
-D
and-U
flags start with a simple identifier that we can guarantee a simple analysis of can determine if two flags refer to the same identifier or not. See the comment ongetSimpleMacroName()
for details of what the issues are.Cherry pick of: llvm#82568