mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 13:35:38 +08:00
[ELF] - Do not report multiple errors for single one in ScriptLexer::setError.
Previously up to 3 errors were reported at once, with patch we always will report only one, just like in other linker code. Differential revision: https://reviews.llvm.org/D37015 llvm-svn: 311537
This commit is contained in:
@@ -78,15 +78,11 @@ void ScriptLexer::setError(const Twine &Msg) {
|
||||
if (ErrorCount)
|
||||
return;
|
||||
|
||||
if (!Pos) {
|
||||
error(getCurrentLocation() + ": " + Msg);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string S = getCurrentLocation() + ": ";
|
||||
error(S + Msg);
|
||||
error(S + getLine());
|
||||
error(S + std::string(getColumnNumber(), ' ') + "^");
|
||||
std::string S = (getCurrentLocation() + ": " + Msg).str();
|
||||
if (Pos)
|
||||
S += "\n>>> " + getLine().str() + "\n>>> " +
|
||||
std::string(getColumnNumber(), ' ') + "^";
|
||||
error(S);
|
||||
}
|
||||
|
||||
// Split S into linker script tokens.
|
||||
|
||||
Reference in New Issue
Block a user