[PATCH] D39259: [lld] unified COFF and ELF error handling on new Common/ErrorHandler
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 14:35:32 PDT 2017
ruiu added inline comments.
================
Comment at: lld/COFF/Driver.cpp:797
Config->Verbose = true;
+ errorHandler().Verbose =Config->Verbose;
----------------
clang-format?
================
Comment at: lld/ELF/DriverUtils.cpp:56
+// or -no-color-diagnostics flags.
+static void handleColorDiagnostics(opt::InputArgList &Args, ErrorHandler &EH) {
auto *Arg = Args.getLastArg(OPT_color_diagnostics, OPT_color_diagnostics_eq,
----------------
You don't need to pass ErrorHandler because you can call errorHandler() in this function.
================
Comment at: lld/include/lld/Common/ErrorHandler.h:50-54
+ ErrorHandler(llvm::raw_ostream *Stream, StringRef LogName)
+ : ErrorLimitExceededMsg("too many errors emitted, stopping now (use "
+ "-error-limit=0 to see all errors)"),
+ LogName(LogName), ErrorOS(Stream),
+ ColorDiagnostics(Stream->has_colors()) {}
----------------
I believe you are not using this ctor.
https://reviews.llvm.org/D39259
More information about the llvm-commits
mailing list