[PATCH] D77307: [Support] Make DataExtractor string functions 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, MaskRay.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This patch adds an optional Error argument to DataExtractor functions
for string extraction, and makes them behave like other DataExtractor
functions (set the error if extraction fails, don't do anything if the
error is already set).

I have merged the StringRef and c string versions of the functions to
reduce code duplication.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77307

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: D77307.254517.patch
Type: text/x-patch
Size: 5092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200402/fb05cc2a/attachment.bin>


More information about the llvm-commits mailing list