HomePhabricator

[llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI.

Authored by grimar on May 28 2020, 7:42 AM.

Description

[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 usings to make the code a bit shorter.

Differential revision: https://reviews.llvm.org/D80726