[lld] [llvm] [Symbolizer] Support for Missing Line Numbers. (PR #82240)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 08:32:39 PDT 2024
================
@@ -131,14 +131,17 @@ void PlainPrinterBase::printFunctionName(StringRef FunctionName, bool Inlined) {
void LLVMPrinter::printSimpleLocation(StringRef Filename,
const DILineInfo &Info) {
- OS << Filename << ':' << Info.Line << ':' << Info.Column << '\n';
+ OS << Filename << ':' << Info.Line << ':' << Info.Column
+ << (Info.IsApproximatedLine ? (" " + Twine(Info.ApproxString)) : "")
----------------
dwblaikie wrote:
Perhaps this (& below) would be more legible following the way `Discriminator` is printed, using an `if` rather than a conditional operator:
```
OS << Filename << ':' << Info.Line << ':' << Info.Column
if (Info.IsApproximatedLine)
OS << " " << Info.ApproxString;
OS << '\n';
```
(& same change below in `GNUPrinter::printSimpleLocation`)
https://github.com/llvm/llvm-project/pull/82240
More information about the llvm-commits
mailing list