[PATCH] Driver: Replace switch cases with ifs.
ruiu at google.com
Fri Feb 6 19:11:09 PST 2015
Do you think they still stand?
(a) is a matter of taste, but well, if something can be written using if, I
wouldn't convert it to a switch. (b) is not a matter -- OptTable handles
optional arguments for you. For (c) we didn't do duplication check.
On Fri, Feb 6, 2015 at 7:00 PM, Shankar Kalpathi Easwaran <
shankarke at gmail.com> wrote:
> a) would be easier to add more options, just add another case statement
> b) easy to transition state from one option to another in case of
> positional options.
> c) sometimes specifying the same argument multiple times is invalid, so
> becomes easier to check too.
> EMAIL PREFERENCES
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits