[cfe-commits] [PATCH] Fix for bug 7870 (incorrect O level)

Richard Smith richard at metafoo.co.uk
Sun Feb 5 15:27:45 PST 2012


Nice catch! I'm sure we didn't mean to treat -O9 as a synonym for -O1 :)
The patch looks fine. Please add a test then feel free to check in.

Thanks!
Richard

On Sun, Feb 5, 2012 at 2:52 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

> This patch fixed 7870, where you pass in an incorrect O level on the
> command line.  The problem was that the supplied value was truncated
> to 4 bits and then being reported.  The patch simply saves the
> supplied value and assigns it after verification (or diagnostic
> output).
>
> eg)
> c:\llvm\build>clang -O900 "C:\Users\Aaron Ballman\Desktop\test.cpp"
> error: invalid value '4' in '-O900'
>
> becomes:
> c:\llvm\build>clang -O900 "C:\Users\Aaron Ballman\Desktop\test.cpp"
> error: invalid value '900' in '-O900'
>
> ~Aaron
>
> _______________________________________________
> 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/20120205/bbee3705/attachment.html>


More information about the cfe-commits mailing list