[llmv-pdbutil] Replace ExitOnError with explicit error handling.
authorCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Sun, 20 Mar 2022 07:40:32 +0000 (07:40 +0000)
committerCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Mon, 21 Mar 2022 05:07:10 +0000 (05:07 +0000)
commitafc2f024462951d6e74c5e733f4b4666e21d3309
treee6510fd1d9ff6743b9f70eba8e6637d981174cab
parent38e8880e931293dab8e90cac731e4bda2306836d
[llmv-pdbutil] Replace ExitOnError with explicit error handling.

At Sony we are developing llvm-dva

https://lists.llvm.org/pipermail/llvm-dev/2020-August/144174.html

For its PDB support, it requires functionality already present
in llvm-pdbutil.

We intend to move that functionaly into the PDB library to be
shared by both tools. That change will be done in 2 steps, that
will be submitted as 2 patches:

(1) Replace 'ExitOnError' with explicit error handling.
(2) Move the intended shared code to the PDB library.

This patch is for step (1).

As 'ExitOnError' is intended to be used only in tool code, replace
all occurrences in the code that will be moved to the PDB library
with explicit error handling.

Reviewed By: aganea, dblaikie, rnk

Differential Revision: https://reviews.llvm.org/D121801
llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
llvm/tools/llvm-pdbutil/InputFile.cpp