This change will go in on top of https://reviews.llvm.org/D65993.
It simply moves the code that already exists into a new function.
Details
- Reviewers
compnerd aaron.ballman - Commits
- rG740f69b91b4c: [NFC][clang] Moving argument handling: Driver::BuildActions -> handleArguments
rC368881: [NFC][clang] Moving argument handling: Driver::BuildActions -> handleArguments
rL368881: [NFC][clang] Moving argument handling: Driver::BuildActions -> handleArguments
Diff Detail
- Repository
- rC Clang
Event Timeline
really sorry for how bad this diff looks. phab just doesnt present in a very ideal way.
clang/include/clang/Driver/Driver.h | ||
---|---|---|
264 ↗ | (On Diff #214545) | I think the presence of the YcArg and YuArg parameters needs some explanation in the comments, as those seem rather out of place. |
clang/include/clang/Driver/Driver.h | ||
---|---|---|
264 ↗ | (On Diff #214545) | Those are the only corner case as far as things used and modified in the scope. Was just trying to preserve the existing behavior. I think those two args are used for clang-cl and the code that handles them just sets them to nullptr. I can add a comment trying to explain what is happening here. There were some tests that I remember were failing if those args weren't set to nullptr after being used. |
Moved the initialization of YcArg and YuArg and initial handling of those args into handleArguments. ninja check-clang passes.
clang/include/clang/Driver/Driver.h | ||
---|---|---|
264 ↗ | (On Diff #214545) | I got rid of those arguments. Moved the code that starts setting those and using those variables into handleArguments. That makes sense to me since that code is handling the clang-cl /Yu and /Yc args. |
@aaron.ballman Good catch on the /Yc /Yu args. I like the way its looking a lot more now.
Ugh, this is still not the most structured handling of the arguments. But, yeah, this seems like it should be equivalent. Fine by me if @aaron.ballman has no more comments.