[PATCH] D66011: [llvm-readobj] - Remove 'error(Error EC)' helper.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 06:03:29 PDT 2019
MaskRay added inline comments.
================
Comment at: tools/llvm-readobj/COFFDumper.cpp:1922
TDV.setIpiTypes(IpiTypes);
- error(codeview::visitTypeStream(IpiTypes, TDV));
+ if (Error Err = codeview::visitTypeStream(IpiTypes, TDV))
+ reportError("<?>", std::move(Err));
----------------
`reportError(..., codeview::visitTypeStream(..))`
================
Comment at: tools/llvm-readobj/ELFDumper.cpp:4417
ProcessNote(Note);
if (Err)
+ reportError(this->FileName, std::move(Err));
----------------
`if (Err)` can be deleted
================
Comment at: tools/llvm-readobj/ELFDumper.cpp:4429
ProcessNote(Note);
if (Err)
+ reportError(this->FileName, std::move(Err));
----------------
`if (Err)` can be deleted
================
Comment at: tools/llvm-readobj/llvm-readobj.cpp:385
void reportError(StringRef Input, Error Err) {
+ if (!Err)
----------------
reportError now checks `if (!Err)`. Is it still appropriate to call it `reportError`? I want to hear other opinions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66011/new/
https://reviews.llvm.org/D66011
More information about the llvm-commits
mailing list