diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 5e54e6781e..a8f164cd9c 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1837,15 +1837,16 @@ void AsmPrinter::EmitComments(const MachineInstr &MI) const { // Print source line info. O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " SrcLine "; - if (DLT.Scope) { - DICompileUnit CU(DLT.Scope); - if (!CU.isNull()) - O << CU.getFilename() << " "; - } - O << DLT.Line; + O << MAI->getCommentString() << ' '; + DIScope Scope(DLT.Scope); + // Omit the directory, because it's likely to be long and uninteresting. + if (!Scope.isNull()) + O << Scope.getFilename(); + else + O << "<unknown>"; + O << ':' << DLT.Line; if (DLT.Col != 0) - O << ":" << DLT.Col; + O << ':' << DLT.Col; Newline = true; } |