[PATCH] D66468: [llvm-objdump] - Remove one of `report_error` functions and improve the error reporting.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 04:35:26 PDT 2019
jhenderson added inline comments.
================
Comment at: tools/llvm-objdump/MachODump.cpp:2216
static void printArchiveChild(StringRef Filename, const Archive::Child &C,
- bool verbose, bool print_offset,
+ size_t Ndx, bool verbose, bool print_offset,
StringRef ArchitectureName = StringRef()) {
----------------
Ndx -> ChildIndex
================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:372
+ return NameOrErr.get();
+ consumeError(NameOrErr.takeError());
+ return "<file index: " + std::to_string(Index) + ">";
----------------
Comment to explain why we're consuming the error?
================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:441
-LLVM_ATTRIBUTE_NORETURN void report_error(Error E, StringRef ArchiveName,
+LLVM_ATTRIBUTE_NORETURN void report_error1(Error E, StringRef ArchiveName,
const object::Archive::Child &C,
----------------
Did you mean to delete this function?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66468/new/
https://reviews.llvm.org/D66468
More information about the llvm-commits
mailing list