aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCParser/AsmLexer.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-04-12 00:18:03 +0000
committerEric Christopher <echristo@apple.com>2011-04-12 00:18:03 +0000
commitffc0e1f6e6cab28f4c454ab1fd23486a081b5f3b (patch)
tree12878fdcd6083014308fb48da6884ce15ffc1619 /llvm/lib/MC/MCParser/AsmLexer.cpp
parent672ef14a62da5e6dca3be55cd72e4e610933bb10 (diff)
downloadllvm-ffc0e1f6e6cab28f4c454ab1fd23486a081b5f3b.zip
llvm-ffc0e1f6e6cab28f4c454ab1fd23486a081b5f3b.tar.gz
llvm-ffc0e1f6e6cab28f4c454ab1fd23486a081b5f3b.tar.bz2
Match case for invalid constant error messages and add a new
test for invalid hexadecimals. llvm-svn: 129326
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmLexer.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmLexer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp
index 0fa782b..a3d3a49 100644
--- a/llvm/lib/MC/MCParser/AsmLexer.cpp
+++ b/llvm/lib/MC/MCParser/AsmLexer.cpp
@@ -213,13 +213,13 @@ AsmToken AsmLexer::LexDigit() {
// Requires at least one binary digit.
if (CurPtr == NumStart)
- return ReturnError(TokStart, "Invalid binary number");
+ return ReturnError(TokStart, "invalid binary number");
StringRef Result(TokStart, CurPtr - TokStart);
long long Value;
if (Result.substr(2).getAsInteger(2, Value))
- return ReturnError(TokStart, "Invalid binary number");
+ return ReturnError(TokStart, "invalid binary number");
// The darwin/x86 (and x86-64) assembler accepts and ignores ULL and LL
// suffixes on integer literals.
@@ -236,11 +236,11 @@ AsmToken AsmLexer::LexDigit() {
// Requires at least one hex digit.
if (CurPtr == NumStart)
- return ReturnError(CurPtr-2, "Invalid hexadecimal number");
+ return ReturnError(CurPtr-2, "invalid hexadecimal number");
unsigned long long Result;
if (StringRef(TokStart, CurPtr - TokStart).getAsInteger(0, Result))
- return ReturnError(TokStart, "Invalid hexadecimal number");
+ return ReturnError(TokStart, "invalid hexadecimal number");
// The darwin/x86 (and x86-64) assembler accepts and ignores ULL and LL
// suffixes on integer literals.
@@ -257,7 +257,7 @@ AsmToken AsmLexer::LexDigit() {
StringRef Result(TokStart, CurPtr - TokStart);
long long Value;
if (Result.getAsInteger(8, Value))
- return ReturnError(TokStart, "Invalid octal number");
+ return ReturnError(TokStart, "invalid octal number");
// The darwin/x86 (and x86-64) assembler accepts and ignores ULL and LL
// suffixes on integer literals.