mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-19 04:28:20 +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:
@@ -192,18 +192,21 @@ void SMDiagnostic::Print(const char *ProgName, raw_ostream &S) {
|
|||||||
if (ProgName && ProgName[0])
|
if (ProgName && ProgName[0])
|
||||||
S << ProgName << ": ";
|
S << ProgName << ": ";
|
||||||
|
|
||||||
if (Filename == "-")
|
if (!Filename.empty()) {
|
||||||
S << "<stdin>";
|
if (Filename == "-")
|
||||||
else
|
S << "<stdin>";
|
||||||
S << Filename;
|
else
|
||||||
|
S << Filename;
|
||||||
|
|
||||||
if (LineNo != -1) {
|
if (LineNo != -1) {
|
||||||
S << ':' << LineNo;
|
S << ':' << LineNo;
|
||||||
if (ColumnNo != -1)
|
if (ColumnNo != -1)
|
||||||
S << ':' << (ColumnNo+1);
|
S << ':' << (ColumnNo+1);
|
||||||
|
}
|
||||||
|
S << ": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
S << ": " << Message << '\n';
|
S << Message << '\n';
|
||||||
|
|
||||||
if (LineNo != -1 && ColumnNo != -1 && ShowLine) {
|
if (LineNo != -1 && ColumnNo != -1 && ShowLine) {
|
||||||
S << LineContents << '\n';
|
S << LineContents << '\n';
|
||||||
|
Reference in New Issue
Block a user