[PATCH] D77306: [llvm/Support] Make more DataExtractor methods error-aware

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 07:33:44 PDT 2020


labath created this revision.
labath added reviewers: dblaikie, aprantl.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This patch adds the optional Error argument, and the Cursor variants to
more DataExtractor methods. The functions now behave the same way as
other error-aware functions (they set the error when they fail, and
don't do anything if the error is already set).

I have merged the LEB128 implementations via a template (similarly to
how fixed-size functions are handled) to reduce code duplication.

Depends on D77304 <https://reviews.llvm.org/D77304>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77306

Files:
  llvm/include/llvm/Support/DataExtractor.h
  llvm/lib/Support/DataExtractor.cpp
  llvm/unittests/Support/DataExtractorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77306.254514.patch
Type: text/x-patch
Size: 8656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200402/10fdf7ef/attachment.bin>


More information about the llvm-commits mailing list