diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-04-14 21:36:42 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-04-14 21:36:42 +0000 |
| commit | 3072b130b2e2bd471d66933ac3eb0b497a0867d7 (patch) | |
| tree | 1305fbb7e5bb7b3498830d0161a21eb219f7f279 /llvm/tools/dsymutil/MachODebugMapParser.cpp | |
| parent | f08da81de0fabf510dbcaa1aba781deda56548a4 (diff) | |
| download | bcm5719-llvm-3072b130b2e2bd471d66933ac3eb0b497a0867d7.tar.gz bcm5719-llvm-3072b130b2e2bd471d66933ac3eb0b497a0867d7.zip | |
[Support] Add convenience functions to WithColor. NFC.
Create convenience functions for printing error, warning and note to
stdout. Previously we had similar functions being used in dsymutil, but
given that this pattern is so common it makes sense to make it available
globally.
llvm-svn: 330091
Diffstat (limited to 'llvm/tools/dsymutil/MachODebugMapParser.cpp')
| -rw-r--r-- | llvm/tools/dsymutil/MachODebugMapParser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp index 2ec0e629e96..0072e7a7840 100644 --- a/llvm/tools/dsymutil/MachODebugMapParser.cpp +++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp @@ -9,11 +9,11 @@ #include "BinaryHolder.h" #include "DebugMap.h" -#include "ErrorReporting.h" #include "MachOUtils.h" #include "llvm/ADT/Optional.h" #include "llvm/Object/MachO.h" #include "llvm/Support/Path.h" +#include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" namespace { @@ -102,9 +102,10 @@ private: StringRef BinaryPath); void Warning(const Twine &Msg, StringRef File = StringRef()) { - warn_ostream() << "(" - << MachOUtils::getArchName(Result->getTriple().getArchName()) - << ") " << File << " " << Msg << "\n"; + WithColor::warning() << "(" + << MachOUtils::getArchName( + Result->getTriple().getArchName()) + << ") " << File << " " << Msg << "\n"; if (PaperTrailWarnings) { if (!File.empty()) |

