This patch introduces 3 helper functions: error(), warn() and note() to
make printing during verification more consistent. When supported, the
respective prefixes are printed in color using the same color scheme as
clang.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I opted for this approach rather than passing a Twine to an error/warn function because of format objects.
Comment Actions
Sweet.
And then we can add color (using the same color scheme as clang with -fcolor-diagnostics) when printing to a real TTY (there already is code in dwarfdump to detect this).
Are there errors/warnings outside of DWARFVerifier.cpp, too?
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
---|---|---|
154 ↗ | (On Diff #117011) | in the compiler we often prefix additional comments with note: . Should we do this here, too? (with a note() << function? |
Comment Actions
Thanks!
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
---|---|---|
328 ↗ | (On Diff #117017) | This doesn't belong in this review, but I just noticed that we also should define a similar helper for formatting a range. I think at some point we all agreed that half-open ranges should be formatted [start,end). |
test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s | ||
7 ↗ | (On Diff #117017) | extra whitespace |