[PATCH] D130506: [Support] Add llvm::compression::{getReasonIfUnsupported,compress,decompress}

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 10:45:45 PDT 2022


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: llvm/include/llvm/Support/Compression.h:26-27
+// object file formats (e.g. ELF). This is a separate class as we may add new
+// compression::Format members for non-debugging purposes.
+enum class DebugCompressionType {
+  None, ///< No compression
----------------
ckissane wrote:
> ckissane wrote:
> > I think a renaming would be good to keep this extra clear.
> > Not a blocker though
> > it could also be good to keep this enum closer to elf-related code.
> Note that you state:
> > Move llvm::DebugCompressionType from MC to Support to avoid Support->MC cyclic
> > dependency. There are 40+ uses in llvm-project.
> 
> would moving both this enum and
> ```
> inline Format formatFor(DebugCompressionType Type) 
> ```
> into MC also resolve this?
The `DebugCompressionType` rename change is what I want to avoid. The type may be reused by another object file format and there are ~40 uses in llvm-project which would need updating.

MC depends on Support, so Support cannot depend on MC (cyclic). The type is therefore moved to the lower level: Support.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130506



More information about the llvm-commits mailing list