[llvm] r174927 - Update error message due to previous commit, r174926.

Chad Rosier mcrosier at apple.com
Tue Feb 12 11:06:06 PST 2013


On Feb 11, 2013, at 5:45 PM, Chad Rosier <mcrosier at apple.com> wrote:

> 
> On Feb 11, 2013, at 5:41 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 
>> On Tue, Feb 12, 2013 at 3:12 AM, Chad Rosier <mcrosier at apple.com> wrote:
>>> Author: mcrosier
>>> Date: Mon Feb 11 19:12:24 2013
>>> New Revision: 174927
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=174927&view=rev
>>> Log:
>>> Update error message due to previous commit, r174926.
>>> 
>>> Modified:
>>>   llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
>>> 
>>> Modified: llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmLexer.cpp?rev=174927&r1=174926&r2=174927&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/MC/MCParser/AsmLexer.cpp (original)
>>> +++ llvm/trunk/lib/MC/MCParser/AsmLexer.cpp Mon Feb 11 19:12:24 2013
>>> @@ -285,9 +285,11 @@ AsmToken AsmLexer::LexDigit() {
>>>  // Either octal or hexidecimal.
>>>  long long Value;
>>>  unsigned Radix = doLookAhead(CurPtr, 8);
>>> +  bool isHex = Radix == 16;
>>>  StringRef Result(TokStart, CurPtr - TokStart);
>>>  if (Result.getAsInteger(Radix, Value))
>>> -    return ReturnError(TokStart, "invalid octal number");
>>> +    return ReturnError(TokStart, !isHex ? "invalid octal number" :
>>> +                       "invalid hexdecimal number");
>> 
>> This would be easier to read if the condition was not reversed.
> 
> Ok.  I have a follow up patch coming shortly.  I'll clean it up there, if you don't mind.

Cleaned up in r174983.

> Chad
> 
>> 
>> Dmitri
>> 
>> -- 
>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list