aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/AsmLexer.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-12 01:12:24 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-12 01:12:24 +0000
commit53e5bb70db34b736eed01c1580af1afd7314a2d8 (patch)
treec64c17c29de21258c41a005e72b4fcae03b0d42b /lib/MC/MCParser/AsmLexer.cpp
parentd556fd129026f6e3fa6ea9c2c70ba489bff18954 (diff)
Update error message due to previous commit, r174926.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmLexer.cpp')
-rw-r--r--lib/MC/MCParser/AsmLexer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp
index a7de64f32e..530e94e8d3 100644
--- a/lib/MC/MCParser/AsmLexer.cpp
+++ b/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)