diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2020-12-15 15:45:15 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2020-12-16 13:14:23 +0300 |
commit | 407d42002904ce541f732ce4300913ef57cff232 (patch) | |
tree | ab845530cd316fa895087a054f337a13a7a983d5 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 78aea98308a85c061a87952e9842bf1e6fe097d5 (diff) | |
download | llvm-407d42002904ce541f732ce4300913ef57cff232.zip llvm-407d42002904ce541f732ce4300913ef57cff232.tar.gz llvm-407d42002904ce541f732ce4300913ef57cff232.tar.bz2 |
[lib/Object] - Make ELFObjectFile::getSymbol() return Expected<>.
This was requested in comments for D93209:
https://reviews.llvm.org/D93209#inline-871192
D93209 fixes an issue with `ELFFile<ELFT>::getEntry`,
after what `getSymbol` starts calling `report_fatal_error` for previously
missed invalid cases.
This patch makes it return `Expected<>` and updates callers.
For few of them I had to add new `report_fatal_error` calls. But I see no
way to avoid it currently. The change would affects too many places, e.g:
`getSymbolBinding` and other methods are used from `ELFSymbolRef`
which is used in too many places across LLVM.
Differential revision: https://reviews.llvm.org/D93297
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions