[PATCH] Driver: Replace switch cases with ifs.

Shankar Kalpathi Easwaran shankarke at gmail.com
Fri Feb 6 19:00:39 PST 2015


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.


http://reviews.llvm.org/D7478

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list