forked from OSchip/llvm-project
Update error message due to previous commit, r174926.
llvm-svn: 174927
This commit is contained in:
parent
8bc655605b
commit
559cea4e10
|
@ -285,9 +285,11 @@ AsmToken AsmLexer::LexDigit() {
|
||||||
// Either octal or hexidecimal.
|
// Either octal or hexidecimal.
|
||||||
long long Value;
|
long long Value;
|
||||||
unsigned Radix = doLookAhead(CurPtr, 8);
|
unsigned Radix = doLookAhead(CurPtr, 8);
|
||||||
|
bool isHex = Radix == 16;
|
||||||
StringRef Result(TokStart, CurPtr - TokStart);
|
StringRef Result(TokStart, CurPtr - TokStart);
|
||||||
if (Result.getAsInteger(Radix, Value))
|
if (Result.getAsInteger(Radix, Value))
|
||||||
return ReturnError(TokStart, "invalid octal number");
|
return ReturnError(TokStart, !isHex ? "invalid octal number" :
|
||||||
|
"invalid hexdecimal number");
|
||||||
|
|
||||||
// Consume the [hH].
|
// Consume the [hH].
|
||||||
if (Radix == 16)
|
if (Radix == 16)
|
||||||
|
|
Loading…
Reference in New Issue