diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-04-14 22:07:23 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-04-14 22:07:23 +0000 |
commit | 84e99265d6a7589fee870f8f0a85ad50351e6cdc (patch) | |
tree | 765e1a976eb94b818e1215ff810691fefb9560f7 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | |
parent | 3072b130b2e2bd471d66933ac3eb0b497a0867d7 (diff) | |
download | bcm5719-llvm-84e99265d6a7589fee870f8f0a85ad50351e6cdc.tar.gz bcm5719-llvm-84e99265d6a7589fee870f8f0a85ad50351e6cdc.zip |
[DebugInfo] Use WithColor to print errors/warnings
Use the convenience methods from WithColor to consistently print errors
and warnings in libDebugInfo.
llvm-svn: 330092
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index e9f4df6f27c..e8330a0e271 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -44,6 +44,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/TargetRegistry.h" +#include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <cstdint> @@ -502,7 +503,7 @@ void DWARFContext::dump( DWARFDebugRnglistTable Rnglists; uint32_t TableOffset = Offset; if (Error Err = Rnglists.extract(rnglistData, &Offset)) { - errs() << "error: " + toString(std::move(Err)) << '\n'; + WithColor::error() << toString(std::move(Err)) << '\n'; uint64_t Length = Rnglists.length(); // Keep going after an error, if we can, assuming that the length field // could be read. If it couldn't, stop reading the section. @@ -1167,7 +1168,7 @@ static bool isRelocScattered(const object::ObjectFile &Obj, } ErrorPolicy DWARFContext::defaultErrorHandler(Error E) { - errs() << "error: " + toString(std::move(E)) << '\n'; + WithColor::error() << toString(std::move(E)) << '\n'; return ErrorPolicy::Continue; } |