This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objcopy][NFC] More error propagation
ClosedPublic

Authored by rupprecht on Jan 29 2019, 3:51 PM.

Details

Summary

Do some more error cleanup, removing some dependencies from llvm-objcopy's error/reportError in [ELF/COFF]Objcopy methods.

Diff Detail

Repository
rL LLVM

Event Timeline

rupprecht created this revision.Jan 29 2019, 3:51 PM
rupprecht set the repository for this revision to rL LLVM.Jan 29 2019, 3:51 PM
jakehehrlich accepted this revision.Jan 29 2019, 5:03 PM

OMG thank you. I've been wanting this to happen so badly. LGTM.

This revision is now accepted and ready to land.Jan 29 2019, 5:03 PM
jhenderson added inline comments.Jan 30 2019, 1:33 AM
llvm/tools/llvm-objcopy/llvm-objcopy.cpp
147–148 ↗(On Diff #184199)

You seem to have missed several reportError calls in this function. Was that intentional?

This revision was automatically updated to reflect the committed changes.

OMG thank you. I've been wanting this to happen so badly. LGTM.

:)
There's about 40 calls to error/reportError from outside the main driver class, this fixes 10-ish of them, so still over half of them to go...

llvm/tools/llvm-objcopy/llvm-objcopy.cpp
147–148 ↗(On Diff #184199)

Nope -- missed this one, I'll follow up with a fix. (Accidentally checked in this one instead of D57248 before addressing this, sorry... was in the wrong git branch :( ).