[PATCH] D131992: [Support] compression proposal for a enum->spec->impl approach

Cole Kissane via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 15:06:04 PDT 2022


ckissane added inline comments.


================
Comment at: llvm/include/llvm/Support/Compression.h:95-98
+  static CompressionSpecRef Unknown;
+  static CompressionSpecRef None;
+  static CompressionSpecRef Zlib;
+  static CompressionSpecRef ZStd;
----------------
dblaikie wrote:
> Generally we don't want more variables that need global constructors in LLVM - so these should probably be function-local statics in functions instead.
> (I don't think we need a CompressionSpecRef for `Unknown` or `None`, though)
these are just shortcuts to the function local statics of `CompressionSpecRef getCompressionSpec(uint8_t Kind)`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131992/new/

https://reviews.llvm.org/D131992



More information about the llvm-commits mailing list