[llvm-readobj] - Use cantFail() for all `Obj->sections()` calls. NFCI.
`ELFDumper<ELFT>::ELFDumper` calls `Obj->sections()` in its constructor: https://github.com/llvm/llvm-project/blob/master/llvm/tools/llvm-readobj/ELFDumper.cpp#L2046 this means that all subsequent calls can't fail and can be wrapped into `cantFail` in instead of `unwrapOrError` for simplicity. Actually we already do it in a few places. In this patch I've fixed all other places I've found. Differential revision: https://reviews.llvm.org/D83126
Loading
Please sign in to comment