[PATCH] D69471: [Coverage] Revise format to reduce binary size
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 14:19:54 PST 2019
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
More information about the cfe-commits
mailing list