[PATCH] D26981: Limit maximum number of errors to 1000.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 10:53:27 PST 2016


davide added a comment.

I think the idea is OK, but I have some questions about the implementation. Please see inline comment.



================
Comment at: ELF/Error.h:34-36
+// The maximum number of errors. If error() is called more than
+// this number, LLD bails out. 0 means no limit.
+const unsigned ErrorLimit = 1000;
----------------
I'm not sure why you want to say `ErrorLimit == 0` means no limit and not make this configurable. Either make it configurable or remove the special meaning for 0 here (and below).

I'd pretty much prefer having a limit fixed instead of configurable. I also think that 1000 is too big of a number. IIRC clang sets `-ferror-limit` to 20 by default, maybe something nearer to that threshold?


https://reviews.llvm.org/D26981





More information about the llvm-commits mailing list