[PATCH] D86772: [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 05:08:04 PDT 2020
grimar added inline comments.
================
Comment at: llvm/tools/llvm-readobj/llvm-readobj.cpp:640
else
- reportError(errorCodeToError(readobj_error::unrecognized_file_format),
- File);
+ // Not tested, because all possible file types are handled.
+ reportError(
----------------
sbc100 wrote:
> Should we assert or llvm_unreachable here then? Since it should be impossible to get here because the above "case" statement should handle all valid file types?
I don't think that it is right to use `llvm_unreachable`, because I guess it might be possible that one day a new object format appears, but will be unsupported by `llvm-readelf`. We probably don't want to fail in this case, but want to show an error message I think.
Regarding adding an `assert`, I don't know. I don't have any stong feeling about it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86772/new/
https://reviews.llvm.org/D86772
More information about the llvm-commits
mailing list