1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test
Georgii Rymar 089f3ae98c [llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error().
`MipsGOTParser` is a helper class that is used to dump MIPS GOT and PLT.
There is a problem with it: it might call report_fatal_error() on invalid input.
When this happens, the tool reports a crash:

```
# command stderr:
LLVM ERROR: Cannot find PLTGOT dynamic table tag.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backt
race.
Stack dump:
...
```

Such error were not tested. In this patch I've refactored `MipsGOTParser`:

I've splitted handling of GOT and PLT to separate methods. This allows to propagate
any possible errors to caller and should allow to dump the PLT when something is wrong
with the GOT and vise versa in the future.

I've added tests for each `report_fatal_error()`
and now calling the `reportError` instead. In the future we might want to switch to
reporting warnings, but it requres the additional testing and should
be performed independently.

I've kept `unwrapOrError` calls untouched for now as I'd like to focus on eliminating
`report_fatal_error` calls in this patch only.

Differential revision: https://reviews.llvm.org/D83225
2020-07-07 16:43:38 +03:00
..
Analysis [AMDGPU] Tweak getTypeLegalizationCost() 2020-07-06 14:07:48 -07:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen [SVE][CodeGen] Legalisation of unpredicated store instructions 2020-07-07 11:47:10 +01:00
DebugInfo
Demangle
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
Linker
LTO
MachineVerifier
MC [WebAssembly] Added 64-bit memory.grow/size/copy/fill 2020-07-06 12:49:50 -07:00
Object
ObjectYAML
Other
Reduce [llvm-reduce] Reducing call operand bundles 2020-07-07 01:16:37 +03:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [openmp] Move isAllowedClauseForDirective to tablegen + add clause version to OMP.td 2020-07-06 22:20:06 -04:00
ThinLTO/X86 [InstCombine] Always try to invert non-canonical predicate of an icmp 2020-07-04 18:12:04 +03:00
tools [llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error(). 2020-07-07 16:43:38 +03:00
Transforms [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz 2020-07-07 15:04:21 +03:00
Unit
Verifier Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh