From 559cea4e104b0323324cefc064e42d1ba206373c Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 12 Feb 2013 01:12:24 +0000 Subject: [PATCH] Update error message due to previous commit, r174926. llvm-svn: 174927 --- llvm/lib/MC/MCParser/AsmLexer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp index a7de64f32e2b..530e94e8d374 100644 --- a/llvm/lib/MC/MCParser/AsmLexer.cpp +++ b/llvm/lib/MC/MCParser/AsmLexer.cpp @@ -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)