aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2024-10-29 12:26:33 -0700
committerGitHub <noreply@github.com>2024-10-29 12:26:33 -0700
commita18af41c20ac9ca22e3c95da3d71475f9f6c31b5 (patch)
tree89512ca79148410744cd214c452fab5faa548264 /llvm/lib/AsmParser/LLLexer.cpp
parent9cc5a4bf667ffcd2765a6a00a311fb4ec8559b37 (diff)
downloadllvm-a18af41c20ac9ca22e3c95da3d71475f9f6c31b5.zip
llvm-a18af41c20ac9ca22e3c95da3d71475f9f6c31b5.tar.gz
llvm-a18af41c20ac9ca22e3c95da3d71475f9f6c31b5.tar.bz2
[LLVM] Change error messages to start with lower case (#113748)
Change LLVM Asm and TableGen Lexer/Parser error messages to begin with lower case.
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index 759db6d..56abd03 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -60,8 +60,8 @@ uint64_t LLLexer::atoull(const char *Buffer, const char *End) {
uint64_t OldRes = Result;
Result *= 10;
Result += *Buffer-'0';
- if (Result < OldRes) { // Uh, oh, overflow detected!!!
- LexError("constant bigger than 64 bits detected!");
+ if (Result < OldRes) { // overflow detected.
+ LexError("constant bigger than 64 bits detected");
return 0;
}
}
@@ -75,8 +75,8 @@ uint64_t LLLexer::HexIntToVal(const char *Buffer, const char *End) {
Result *= 16;
Result += hexDigitValue(*Buffer);
- if (Result < OldRes) { // Uh, oh, overflow detected!!!
- LexError("constant bigger than 64 bits detected!");
+ if (Result < OldRes) { // overflow detected.
+ LexError("constant bigger than 64 bits detected");
return 0;
}
}
@@ -99,7 +99,7 @@ void LLLexer::HexToIntPair(const char *Buffer, const char *End,
Pair[1] += hexDigitValue(*Buffer);
}
if (Buffer != End)
- LexError("constant bigger than 128 bits detected!");
+ LexError("constant bigger than 128 bits detected");
}
/// FP80HexToIntPair - translate an 80 bit FP80 number (20 hexits) into
@@ -118,7 +118,7 @@ void LLLexer::FP80HexToIntPair(const char *Buffer, const char *End,
Pair[0] += hexDigitValue(*Buffer);
}
if (Buffer != End)
- LexError("constant bigger than 128 bits detected!");
+ LexError("constant bigger than 128 bits detected");
}
// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
@@ -292,7 +292,7 @@ lltok::Kind LLLexer::LexDollar() {
StrVal.assign(TokStart + 2, CurPtr - 1);
UnEscapeLexed(StrVal);
if (StringRef(StrVal).contains(0)) {
- LexError("Null bytes are not allowed in names");
+ LexError("NUL character is not allowed in names");
return lltok::Error;
}
return lltok::ComdatVar;
@@ -354,7 +354,7 @@ lltok::Kind LLLexer::LexUIntID(lltok::Kind Token) {
uint64_t Val = atoull(TokStart + 1, CurPtr);
if ((unsigned)Val != Val)
- LexError("invalid value number (too large)!");
+ LexError("invalid value number (too large)");
UIntVal = unsigned(Val);
return Token;
}
@@ -375,7 +375,7 @@ lltok::Kind LLLexer::LexVar(lltok::Kind Var, lltok::Kind VarID) {
StrVal.assign(TokStart+2, CurPtr-1);
UnEscapeLexed(StrVal);
if (StringRef(StrVal).contains(0)) {
- LexError("Null bytes are not allowed in names");
+ LexError("NUL character is not allowed in names");
return lltok::Error;
}
return Var;
@@ -410,7 +410,7 @@ lltok::Kind LLLexer::LexQuote() {
if (CurPtr[0] == ':') {
++CurPtr;
if (StringRef(StrVal).contains(0)) {
- LexError("Null bytes are not allowed in names");
+ LexError("NUL character is not allowed in names");
kind = lltok::Error;
} else {
kind = lltok::LabelStr;
@@ -492,7 +492,7 @@ lltok::Kind LLLexer::LexIdentifier() {
uint64_t NumBits = atoull(StartChar, CurPtr);
if (NumBits < IntegerType::MIN_INT_BITS ||
NumBits > IntegerType::MAX_INT_BITS) {
- LexError("bitwidth for integer type out of range!");
+ LexError("bitwidth for integer type out of range");
return lltok::Error;
}
TyVal = IntegerType::get(Context, NumBits);
@@ -1122,7 +1122,7 @@ lltok::Kind LLLexer::LexDigitOrNegative() {
uint64_t Val = atoull(TokStart, CurPtr);
++CurPtr; // Skip the colon.
if ((unsigned)Val != Val)
- LexError("invalid value number (too large)!");
+ LexError("invalid value number (too large)");
UIntVal = unsigned(Val);
return lltok::LabelID;
}