mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 13:00:50 +00:00
cc46e391a2
This is a follow-up to r327137 where we unified error handling for the DwarfLinker. This replaces calls to errs() and outs() with the appropriate ostream wrapper everywhere in dsymutil. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327411 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
975 B
C++
34 lines
975 B
C++
//===- ErrorReporting.h - dsymutil error reporting -------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_DSYMUTIL_ERRORREPORTING_H
|
|
#define LLVM_TOOLS_DSYMUTIL_ERRORREPORTING_H
|
|
#include "llvm/Support/WithColor.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
namespace llvm {
|
|
namespace dsymutil {
|
|
|
|
inline raw_ostream &error_ostream() {
|
|
return WithColor(errs(), HighlightColor::Error).get() << "error: ";
|
|
}
|
|
|
|
inline raw_ostream &warn_ostream() {
|
|
return WithColor(errs(), HighlightColor::Warning).get() << "warning: ";
|
|
}
|
|
|
|
inline raw_ostream ¬e_ostream() {
|
|
return WithColor(errs(), HighlightColor::Note).get() << "note: ";
|
|
}
|
|
|
|
} // namespace dsymutil
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_TOOLS_DSYMUTIL_ERRORREPORTING_H
|