I'm prolly not the right person to review whether this patch makes sense overall, but for the part that parses the options, that looks fine to me. Would probably be nice to put findInputFile (perhaps in the plural) somewhere more accessible... http://llvm-reviews.chandlerc.com/D1474