summaryrefslogtreecommitdiff
path: root/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
commit05f9e4e8bd2347826c50ec391ea4ec8caffe45ef (patch)
tree62b08339d56ff32127fe591771b42e13ce196bd9 /lib/MC/MCParser/AsmLexer.cpp
parente77f72d7d236cabee6ce154ade0f5c666ecaaaca (diff)
downloadllvm-05f9e4e8bd2347826c50ec391ea4ec8caffe45ef.tar.gz
llvm-05f9e4e8bd2347826c50ec391ea4ec8caffe45ef.tar.bz2
llvm-05f9e4e8bd2347826c50ec391ea4ec8caffe45ef.tar.xz
Match case for invalid constant error messages and add a new
test for invalid hexadecimals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmLexer.cpp')
-rw-r--r--lib/MC/MCParser/AsmLexer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp
index 0fa782b1d9..a3d3a492ec 100644
--- a/lib/MC/MCParser/AsmLexer.cpp
+++ b/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.