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
Diff Detail
- Repository
- rL LLVM
Event Timeline
I opted for this approach rather than passing a Twine to an error/warn function because of format objects.
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 | in the compiler we often prefix additional comments with note: . Should we do this here, too? (with a note() << function? |
Thanks!
lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
---|---|---|
326–330 | 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 | extra whitespace |
in the compiler we often prefix additional comments with note: . Should we do this here, too? (with a note() << function?