[PATCH] D67182: [lib/ObjectYAML] - Improve and cleanup error reporting in ELFState<ELFT> class.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 09:18:14 PDT 2019


MaskRay added inline comments.


================
Comment at: lib/ObjectYAML/ELFEmitter.cpp:117
 
-  bool buildSectionIndex();
-  bool buildSymbolIndexes();
+  bool HasError = false;
+
----------------
MaskRay wrote:
> Instead of `HasError`, have you thought using an integer (`int errorCount = 0;`) ?
Sorry, `int ErrorCount = 0;`

Is there a case that many errors may be accumulated? If yes, we may need an ErrorLimit. We certainly don't need `ErrorLimit` in this patch, but using `ErrorCount` may prevent a future rename `HasError -> ErrorCount`..


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67182/new/

https://reviews.llvm.org/D67182





More information about the llvm-commits mailing list