diff options
Diffstat (limited to 'llvm/tools/dsymutil/DwarfLinker.cpp')
-rw-r--r-- | llvm/tools/dsymutil/DwarfLinker.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp index 6f76d746c0c..3024967db62 100644 --- a/llvm/tools/dsymutil/DwarfLinker.cpp +++ b/llvm/tools/dsymutil/DwarfLinker.cpp @@ -9,6 +9,7 @@ #include "BinaryHolder.h" #include "DebugMap.h" +#include "ErrorReporting.h" #include "MachOUtils.h" #include "NonRelocatableStringpool.h" #include "dsymutil.h" @@ -78,7 +79,6 @@ #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/ThreadPool.h" #include "llvm/Support/ToolOutputFile.h" -#include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" @@ -580,19 +580,7 @@ static bool inFunctionScope(CompileUnit &U, unsigned Idx) { } return false; } - -static raw_ostream &error_ostream() { - return WithColor(errs(), HighlightColor::Error).get() << "error: "; -} - -static raw_ostream &warn_ostream() { - return WithColor(errs(), HighlightColor::Warning).get() << "warning: "; -} - -static raw_ostream ¬e_ostream() { - return WithColor(errs(), HighlightColor::Note).get() << "note: "; -} -} // end anonymous namespace +} // namespace void warn(Twine Warning, Twine Context) { warn_ostream() << Warning + "\n"; @@ -4171,7 +4159,7 @@ bool DwarfLinker::link(const DebugMap &Map) { StringRef File = LinkContext.DMO.getObjectFilename(); auto ErrorOrMem = MemoryBuffer::getFile(File); if (!ErrorOrMem) { - errs() << "Warning: Could not open " << File << "\n"; + warn("Could not open '" + File + "'\n"); continue; } sys::fs::file_status Stat; @@ -4353,5 +4341,5 @@ bool linkDwarf(raw_fd_ostream &OutFile, const DebugMap &DM, return Linker.link(DM); } -} // end namespace dsymutil -} // end namespace llvm +} // namespace dsymutil +} // namespace llvm |