labath added a comment. This seems weird. I have never seen anyone resetting errno *after* a call. Wouldn't it be better to log strerror(errno) somewhere, or make sure that the Status object reflects the actual error? Repository: rL LLVM https://reviews.llvm.org/D43698