[PATCH] D139681: [DX] Improve parse error messages

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 16:26:40 PST 2022


beanz created this revision.
beanz added reviewers: bob80905, python3kgae, tex3d, pow2clk, MaskRay.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
beanz requested review of this revision.
Herald added a project: LLVM.

This change refactors the parte parsing logic to operate on StringRefs
of the part data rather than starting from an offset and splicing down.
It also improves some of the error reporting around part layout.

Specifically, this code now reports a distinct error if there isn't
enough data in the buffer to store the part size and it reports an
error if the parts overlap.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139681

Files:
  llvm/include/llvm/Object/DXContainer.h
  llvm/lib/Object/DXContainer.cpp
  llvm/test/tools/obj2yaml/DXContainer/PartTooSmall.yaml
  llvm/unittests/Object/DXContainerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139681.481471.patch
Type: text/x-patch
Size: 8191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221209/838d0afe/attachment.bin>


More information about the llvm-commits mailing list