<div dir="ltr">This probably makes sense for consistency with clang, but FYI with current libOption each of the "getLastArg" is linear in the command line length, so the previous switch version was actually much more efficient.<div><br></div><div>This might be more problematic for LLD than for clang since linker command lines can sometimes end up being much longer than compiler command lines.</div><div><br></div><div> The right fix of course is for libOption to cache or otherwise avoid O(cmdline length) work per getLastArg.<br><div><br></div><div>-- Sean Silva</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 6, 2015 at 4:42 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi shankarke,<br>
<br>
We used to do like this instead of putting all command line processing<br>
code within one gigantic switch statement. It is converted to a switch<br>
in r188958, which introduced InputGraph.<br>
<br>
Making bunch of ifs to one switch statement with bunch of cases weren't<br>
needed for InputGraph, so I don't know why that change was made in the<br>
first place.<br>
<br>
In this patch I roll that change back. Now all "break"s are removed,<br>
and the nesting is one level shallow.<br>
<br>
<a href="http://reviews.llvm.org/D7478" target="_blank">http://reviews.llvm.org/D7478</a><br>
<br>
Files:<br>
  lib/Driver/WinLinkDriver.cpp<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>