The option-iterating loop should be reserved for options whose command-line
order is important. I think LLD-ELF follows a similar design.
Details
Details
- Reviewers
smeenai - Group Reviewers
Restricted Project - Commits
- rG1168736c6688: [lld-macho][nfc] Parse more options using getLastArg{Value}
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I suppose it's more efficient to have a single iteration of the argument list, but I also don't think argument parsing efficiency matters at all (or at least doesn't matter enough for this change to be a problem), so LGTM.
lld/MachO/Driver.cpp | ||
---|---|---|
594 | nit: the handle prefix is somewhat common for option handling cf eg handleUndefined in the ELF linker |
lld/MachO/Driver.cpp | ||
---|---|---|
594 | hm but the handle functions in ELF seem to take the arg / arg value. Whereas functions that take the ArgList and do both arg lookup + handling seem to be prefixed with get, e.g. getReproduceOption. |
nit: the handle prefix is somewhat common for option handling cf eg handleUndefined in the ELF linker