[llvm] r174927 - Update error message due to previous commit, r174926.
Chad Rosier
mcrosier at apple.com
Mon Feb 11 17:12:24 PST 2013
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");
// Consume the [hH].
if (Radix == 16)
More information about the llvm-commits
mailing list