[PATCH] D128953: [NFC] Refactor llvm::zlib namespace
Cole Kissane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 1 11:20:08 PDT 2022
ckissane added inline comments.
================
Comment at: llvm/include/llvm/Support/Compression.h:49-51
+namespace profile = llvm::compression::zlib;
+
+namespace serialize = llvm::compression::zlib;
----------------
phosek wrote:
> I think we will need to support dynamically selecting (de)compression algorithm for both profile and serialization. For example, we should be able to use read profiles generated by an older version of LLVM that only supported zlib, even if the new one also supports zstd. Given that, I'd omit these and instead use `compression::zlib` everywhere.
Correct, however I think that doing this in the meantime helps make it clear semantically for what purpose each compression call is for. It will make finding all instances of each time of use much easier in the future, and promotes semantically thought out usage.
Therefore I see no reason to not make these explicit aliases as it will only ease transition in the future.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128953/new/
https://reviews.llvm.org/D128953
More information about the cfe-commits
mailing list