diff options
| author | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-04-04 08:39:40 +0000 |
|---|---|---|
| committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-04-04 08:39:40 +0000 |
| commit | 0fed7b0564801eb481332b0c9ab0259a9866164b (patch) | |
| tree | df65e64761f7690f38c80ea29fee8bc6567e6bbc /llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp | |
| parent | 8911c5be46b9ae1235944dee4d2f7e89a12b9fca (diff) | |
| download | bcm5719-llvm-0fed7b0564801eb481332b0c9ab0259a9866164b.tar.gz bcm5719-llvm-0fed7b0564801eb481332b0c9ab0259a9866164b.zip | |
[llvm-symbolizer] Add `--output-style` switch.
In general, llvm-symbolizer follows the output style of GNU's addr2line.
However, there are still some differences; in particular, for a requested
address, llvm-symbolizer prints line and column, while addr2line prints
only the line number.
This patch adds a new switch to select the preferred style.
Differential Revision: https://reviews.llvm.org/D60190
llvm-svn: 357675
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp b/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp index 18fe9bc610b..f6c7ef84958 100644 --- a/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp +++ b/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp @@ -81,7 +81,10 @@ void DIPrinter::print(const DILineInfo &Info, bool Inlined) { else if (Basenames) Filename = llvm::sys::path::filename(Filename); if (!Verbose) { - OS << Filename << ":" << Info.Line << ":" << Info.Column << "\n"; + OS << Filename << ":" << Info.Line; + if (Style == OutputStyle::LLVM) + OS << ":" << Info.Column; + OS << "\n"; printContext(Filename, Info.Line); return; } |

