[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 15:06:24 PDT 2017
ruiu added inline comments.
================
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()) {}
----------------
inglorion wrote:
> ruiu wrote:
> > inglorion wrote:
> > > ruiu wrote:
> > > > I believe you are not using this ctor.
> > > The default ctor delegates to it. I suppose I could just only have a default ctor.
> > Yeah, and initializing a member with an ELF-ish default value seems a bit odd if you move this file to Common directory.
> Yeah. The thinking is basically that this is the common case, with the Windows variant being the odd one out, but I'm happy to do it a different way if you have suggestions. I wasn't able to think of a way I really like better.
Maybe, just initialize it to "too many errors emitted"?
================
Comment at: lld/include/lld/Common/ErrorHandler.h:41-43
+ StringRef ErrorLimitExceededMsg;
+ StringRef LogName;
+ llvm::raw_ostream *ErrorOS;
----------------
You can initialize here with `= ...`.
https://reviews.llvm.org/D39259
More information about the llvm-commits
mailing list