[ELF] - Consistent spelling for error/warning messages
Previously error and warnings were not consistent in lld.
Some of them started from lowercase letter, others from
uppercase. Also there was one or two which had a dot at the end.
This patch changes all messages to start from uppercase letter if
they were not before.
Differential revision: http://reviews.llvm.org/D18045
llvm-svn: 263125
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index b4580b5..bdf199b 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -166,7 +166,7 @@
if (Handler Fn = Cmd.lookup(Tok))
(this->*Fn)();
else
- setError("unknown directive: " + Tok);
+ setError("Unknown directive: " + Tok);
}
}
@@ -190,7 +190,7 @@
if (S.startswith("\"")) {
size_t E = S.find("\"", 1);
if (E == StringRef::npos) {
- error("unclosed quote");
+ error("Unclosed quote");
return {};
}
Ret.push_back(S.substr(1, E - 1));
@@ -217,7 +217,7 @@
if (S.startswith("/*")) {
size_t E = S.find("*/", 2);
if (E == StringRef::npos) {
- error("unclosed comment in a linker script");
+ error("Unclosed comment in a linker script");
return "";
}
S = S.substr(E + 2);
@@ -237,7 +237,7 @@
if (Error)
return "";
if (atEOF()) {
- setError("unexpected EOF");
+ setError("Unexpected EOF");
return "";
}
return Tokens[Pos++];
@@ -255,7 +255,7 @@
if (Error)
return false;
if (atEOF()) {
- setError("unexpected EOF");
+ setError("Unexpected EOF");
return false;
}
if (Tok != Tokens[Pos])
@@ -352,7 +352,7 @@
StringRef Tok = next();
auto MBOrErr = MemoryBuffer::getFile(Tok);
if (!MBOrErr) {
- setError("cannot open " + Tok);
+ setError("Cannot open " + Tok);
return;
}
std::unique_ptr<MemoryBuffer> &MB = *MBOrErr;
@@ -385,7 +385,7 @@
if (Tok == ")")
return;
if (Tok != ",") {
- setError("unexpected token: " + Tok);
+ setError("Unexpected token: " + Tok);
return;
}
next();