[llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 28 May 2020 14:42:42 +0000 (17:42 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Fri, 29 May 2020 13:45:18 +0000 (16:45 +0300)
commit9819976032c5af8d9109f2077e637c8303e4d6df
tree3d84266201a60a0fe996959d4c707657f3aa2de9
parent21dadd774f56778ef68c1ce307205dfbdacc793a
[llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI.

It would be nice to switch to `reportUniqueWarnings` from
`reportError` in this class, but first of all it needs a cleanup.

This patch:
1) Eliminates autos.
2) Removes code duplication.
3) Changes how the code works with `Expected<>`.
4) Introduces 2 new `using`s to make the code a bit shorter.

Differential revision: https://reviews.llvm.org/D80726
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h