efriedma added inline comments.
================ Comment at: llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp:53-56 + Error E = + zlib::compress(FilenamesStr, CompressedStr, zlib::BestSizeCompression); + if (E) + llvm_unreachable("Unexpected failure in zlib::compress"); ---------------- vsk wrote: > rnk wrote: > > I think the shorter pattern for this is `cantFail(zlib::compress(...))`. > Both sound reasonable, I'll pick the shorter spelling. cantFail and report_bad_alloc_error have substantially different semantics. In particular, for non-Asserts builds, cantFail is a no-op, which doesn't seem appropriate for an API that fails on out-of-memory. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69471/new/ https://reviews.llvm.org/D69471 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits