[all-commits] [llvm/llvm-project] 22ebf0: [llvm-readobj] - Refactor the code that dumps relo...
Georgii Rymar via All-commits
all-commits at lists.llvm.org
Sun Feb 16 04:05:50 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 22ebf08006a5b17a4ff6aed09ec5b72867338458
https://github.com/llvm/llvm-project/commit/22ebf08006a5b17a4ff6aed09ec5b72867338458
Author: Georgii Rymar <grimar at accesssoftek.com>
Date: 2020-02-16 (Sun, 16 Feb 2020)
Changed paths:
M llvm/tools/llvm-readobj/ELFDumper.cpp
Log Message:
-----------
[llvm-readobj] - Refactor the code that dumps relocations.
The current code has following issues:
1) It has a duplicated logic part.
2) This logic relies on unwrapOrError calls, but if we want to convert
them to warnings, we will need to change all of them what is hard to do
because of the duplication.
In this patch I've created a new method that returns Expected<> what allows
now to catch all errors in a single place and remove the code duplication.
Note: this change is itself a refactor NFC. It does not change the current logic
anyhow. It prepares the code for the follow-up(s).
Differential revision: https://reviews.llvm.org/D74545
More information about the All-commits
mailing list