aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commit559cea4e104b0323324cefc064e42d1ba206373c (patch)
treedc1cd988b6a4df2e953d33d0dab28738d45c31e6 /llvm/lib/MC/MCParser/AsmLexer.cpp
parent8bc655605b34df95fca46d1dda778b67016bf127 (diff)
downloadllvm-559cea4e104b0323324cefc064e42d1ba206373c.zip
llvm-559cea4e104b0323324cefc064e42d1ba206373c.tar.gz
llvm-559cea4e104b0323324cefc064e42d1ba206373c.tar.bz2
Update error message due to previous commit, r174926.
llvm-svn: 174927
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmLexer.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmLexer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp
index a7de64f..530e94e 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)