[PATCH] D133980: [NFC] Refactor DXContainer to support more parts

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 14:55:59 PDT 2022


beanz created this revision.
beanz added reviewers: lhames, MaskRay, serge-sans-paille.
Herald added subscribers: StephenFan, hiraditya, mgorny.
Herald added a project: All.
beanz requested review of this revision.
Herald added a project: LLVM.

This patch refactors some of the DXContainer Object and YAML code to
make it easier to add more part parsing.

DXContainer has a whole bunch of constant values, so I've added a
DXContainerConstants.def file which will grow with constant
definitions, but starts with just part identifiers. I've also added a
utility to parse the part magic string into an enum, and converted the
code to use that utility and the enum instead of the part literal
string.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133980

Files:
  llvm/include/llvm/BinaryFormat/DXContainer.h
  llvm/include/llvm/BinaryFormat/DXContainerConstants.def
  llvm/include/llvm/ObjectYAML/DXContainerYAML.h
  llvm/lib/BinaryFormat/CMakeLists.txt
  llvm/lib/BinaryFormat/DXContainer.cpp
  llvm/lib/Object/DXContainer.cpp
  llvm/tools/obj2yaml/dxcontainer2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133980.460512.patch
Type: text/x-patch
Size: 5680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220915/9c9b86e6/attachment.bin>


More information about the llvm-commits mailing list