mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
Avoid printing a spurious semicolon when there is no filename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94071 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c37e3d5d7c
commit
5e5442c98b
@ -192,18 +192,21 @@ void SMDiagnostic::Print(const char *ProgName, raw_ostream &S) {
|
||||
if (ProgName && ProgName[0])
|
||||
S << ProgName << ": ";
|
||||
|
||||
if (Filename == "-")
|
||||
S << "<stdin>";
|
||||
else
|
||||
S << Filename;
|
||||
if (!Filename.empty()) {
|
||||
if (Filename == "-")
|
||||
S << "<stdin>";
|
||||
else
|
||||
S << Filename;
|
||||
|
||||
if (LineNo != -1) {
|
||||
S << ':' << LineNo;
|
||||
if (ColumnNo != -1)
|
||||
S << ':' << (ColumnNo+1);
|
||||
if (LineNo != -1) {
|
||||
S << ':' << LineNo;
|
||||
if (ColumnNo != -1)
|
||||
S << ':' << (ColumnNo+1);
|
||||
}
|
||||
S << ": ";
|
||||
}
|
||||
|
||||
S << ": " << Message << '\n';
|
||||
S << Message << '\n';
|
||||
|
||||
if (LineNo != -1 && ColumnNo != -1 && ShowLine) {
|
||||
S << LineContents << '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user