[cfe-commits] r156093 - /cfe/trunk/lib/Driver/Compilation.cpp
Chandler Carruth
chandlerc at google.com
Thu May 3 14:00:49 PDT 2012
On Thu, May 3, 2012 at 12:50 PM, Chad Rosier <mcrosier at apple.com> wrote:
> Author: mcrosier
> Date: Thu May 3 14:50:25 2012
> New Revision: 156093
>
> URL: http://llvm.org/viewvc/llvm-project?rev=156093&view=rev
> Log:
> Canonicalize loop.
>
> Modified:
> cfe/trunk/lib/Driver/Compilation.cpp
>
> Modified: cfe/trunk/lib/Driver/Compilation.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Compilation.cpp?rev=156093&r1=156092&r2=156093&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/Compilation.cpp (original)
> +++ cfe/trunk/lib/Driver/Compilation.cpp Thu May 3 14:50:25 2012
> @@ -219,7 +219,8 @@
> // to avoid emitting warnings about unused args.
> OptSpecifier OutputOpts[] = { options::OPT_o, options::OPT_MD,
> options::OPT_MMD };
> - for (unsigned i = 0; i != sizeof(OutputOpts)/sizeof(OutputOpts[0]);
> ++i) {
> + for (unsigned i = 0, e = sizeof(OutputOpts)/sizeof(OutputOpts[0]); i !=
> e;
>
Maybe use array_lengthof instead of sizeof trickery?
http://llvm.org/docs/doxygen/html/namespacellvm.html#a370ed0e0f2bb66d17cd13f84be54e867
> + ++i) {
> if (TranslatedArgs->hasArg(OutputOpts[i]))
> TranslatedArgs->eraseArg(OutputOpts[i]);
> }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120503/5dddfc09/attachment.html>
More information about the cfe-commits
mailing list