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.<div><br></div><div>Thanks!</div><div>Richard<br><div><br><div class="gmail_quote">
On Sun, Feb 5, 2012 at 2:52 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This patch fixed 7870, where you pass in an incorrect O level on the<br>
command line.  The problem was that the supplied value was truncated<br>
to 4 bits and then being reported.  The patch simply saves the<br>
supplied value and assigns it after verification (or diagnostic<br>
output).<br>
<br>
eg)<br>
c:\llvm\build>clang -O900 "C:\Users\Aaron Ballman\Desktop\test.cpp"<br>
error: invalid value '4' in '-O900'<br>
<br>
becomes:<br>
c:\llvm\build>clang -O900 "C:\Users\Aaron Ballman\Desktop\test.cpp"<br>
error: invalid value '900' in '-O900'<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>