This is an archive of the discontinued LLVM Phabricator instance.

[Object] Change getSectionName() to use Expected<StringRef>
ClosedPublic

Authored by MaskRay on May 2 2019, 12:29 AM.

Event Timeline

MaskRay created this revision.May 2 2019, 12:29 AM

Looks good, apart from one comment.

llvm/tools/llvm-readobj/COFFDumper.cpp
1545–1546

I'm not sure this is the right way to throw away an Error. Assuming for a moment that we don't want to report this error here (I'm guessing we probably should at some point), you should use something like consumeError.

MaskRay updated this revision to Diff 197721.May 2 2019, 2:12 AM

Use consumeError

MaskRay marked 2 inline comments as done.May 2 2019, 2:13 AM
MaskRay added inline comments.
llvm/tools/llvm-readobj/COFFDumper.cpp
1545–1546

Thanks! I forgot consumeError.

jhenderson accepted this revision.May 2 2019, 3:10 AM

LGTM. It might be worth a TODO/FIXME next to that consumeError saying we should propagate it (assuming that we should).

This revision is now accepted and ready to land.May 2 2019, 3:10 AM
MaskRay updated this revision to Diff 197730.May 2 2019, 3:26 AM
MaskRay marked an inline comment as done.

Add a TODO

This revision was automatically updated to reflect the committed changes.