[PATCH] D50196: Use the same constants as zlib to represent compression level.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 6 21:16:06 PDT 2018


dblaikie added subscribers: ruiu, dblaikie.
dblaikie added a comment.

Looks like this change removes/reduces some type safety - by moving to an
int parameter.

Could the enum be kept, but with all the values supported? (an enum's
representable values includes at least (actually more than - round up to
the nearest number of bits required) all the values smaller than the
largest enumerator - so an enum with the BestSize value will be usable for
all the others (eg: even with an enum class which doesn't allow implicit
conversions, a user could write (CompressionLevel)3 to get that specific
level).


Repository:
  rL LLVM

https://reviews.llvm.org/D50196





More information about the llvm-commits mailing list