Page MenuHomePhabricator

[llvm/Support] Make more DataExtractor methods error-aware
ClosedPublic

Authored by labath on Apr 2 2020, 7:06 AM.

Details

Summary

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.

Diff Detail

Event Timeline

labath created this revision.Apr 2 2020, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2020, 7:06 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
dblaikie accepted this revision.Apr 2 2020, 4:04 PM

Sounds good - thanks!

This revision is now accepted and ready to land.Apr 2 2020, 4:04 PM
This revision was automatically updated to reflect the committed changes.