[PATCH] D47799: [COFF] add /errorrepro to save reproducer on error
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 6 11:45:50 PDT 2018
inglorion added inline comments.
================
Comment at: lld/COFF/Driver.cpp:56
+ : OutputFileName(OutputFileName), Prefix(Prefix) {}
+ ~ReproWriter() {
+ if (lld::errorCount() == 0)
----------------
ruiu wrote:
> Is this really called when lld exits? I think by default lld calls _exit() to avoid the cost of destruction, so dtors are not called on exit.
Good point. In an earlier version I had implemented hooks to be run by exitLld() so that I could write the error repro there. This version was an attempt to simplify that, based on the idea that the destructor for ReproWriter is run before control leaves LinkerDriver::link(). That works fine for some cases, but not cases where we exceed the error limit and ExitEarly is true, or we call fatal(). Let me see if I can come up with a better way.
https://reviews.llvm.org/D47799
More information about the llvm-commits
mailing list