[PATCH] D86892: Improve error handling for SmallVector programming errors.
Geoffrey Martin-Noble via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 13:06:50 PDT 2020
GMNGeoffrey added inline comments.
================
Comment at: llvm/lib/Support/ErrorHandling.cpp:172
char OOMMessage[] = "LLVM ERROR: out of memory\n";
ssize_t written = ::write(2, OOMMessage, strlen(OOMMessage));
+ written = ::write(2, Reason, strlen(Reason));
----------------
GMNGeoffrey wrote:
> MaskRay wrote:
> > If the return value is to be ignored, the variable can be removed, i.e. `(void)::write(...)`
> Yeah I wasn't clear why this variable was here, but was just following the existing code. Happy to drop it.
I assume it's to guard against some sort of MUST_USE_RETURN_VALUE check. I'm not sure whether casting directly to void without a variable will avoid that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86892/new/
https://reviews.llvm.org/D86892
More information about the llvm-commits
mailing list