1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/tools
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
..
dsymutil [dsymutil] Don't emit N_AST symbol entries in the Mach-O companion file 2020-06-05 08:42:18 -07:00
gold Test update for a7fa35a629e85a72b8cf07a8f95c7c09d9663808 2020-05-28 16:00:59 -07:00
llc
llvm-ar [llvm-ar][test] Unsupport error-opening-directory.test on FreeBSD 2020-07-03 10:57:32 -07:00
llvm-as
llvm-cfi-verify
llvm-config
llvm-cov [llvm-cov gcov] Support clang<11 fake 4.2 format 2020-06-17 10:17:15 -07:00
llvm-cvtres
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
llvm-diff
llvm-dlltool
llvm-dwarfdump [DebugInfo] Use Cursor to detect errors in debug line prologue parser 2020-07-03 11:52:06 +01:00
llvm-dwp llvm-dwarfdump: Include unit count in DWP index header dumping 2020-06-12 12:40:02 -07:00
llvm-elfabi
llvm-exegesis
llvm-extract
llvm-gsymutil [DWARFYAML][debug_info] Replace 'InitialLength' with 'Format' and 'Length'. 2020-06-30 16:28:39 +08:00
llvm-ifs
llvm-isel-fuzzer
llvm-lib
llvm-lipo
llvm-lit
llvm-locstats
llvm-lto [ThinLTO] Compute the basic block count across modules. 2020-05-28 10:33:05 -07:00
llvm-lto2
llvm-mc
llvm-mca [X86] Add mayLoad/mayStore flags to some X87 instructions that don't have isel patterns to infer them from. 2020-06-23 23:40:30 -07:00
llvm-ml [ms] [llvm-ml] Use default RIP-relative addressing for x64 MASM. 2020-07-01 12:41:07 -04:00
llvm-modextract
llvm-mt
llvm-nm llvm-nm: Implement --special-syms. 2020-06-22 13:05:47 -07:00
llvm-objcopy [llvm-install-name-tool] Merge install-name options 2020-07-06 20:32:32 -07:00
llvm-objdump [llvm-objdump] Decrease instruction indentation for non-x86 2020-06-11 09:10:50 -07:00
llvm-opt-fuzzer
llvm-opt-report
llvm-pdbutil
llvm-profdata [llvm-profdata] --hot-func-list: fix some style issues in D81800 2020-06-24 15:17:03 -07:00
llvm-ranlib
llvm-rc [llvm-rc] Implement the language id option 2020-06-23 11:14:07 +03:00
llvm-readobj [llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error(). 2020-07-07 16:43:38 +03:00
llvm-size [llvm-size] Output REL, RELA and STRTAB sections when allocatable 2020-07-01 12:02:32 +01:00
llvm-split
llvm-strings
llvm-symbolizer [NFC] Remove outdated comment in llvm-symbolizer test case. 2020-06-23 17:10:46 -07:00
llvm-xray [llvm-xray][test] Fix unsupported-elf32.txt after D80185 2020-05-28 19:16:29 -07:00
lto
obj2yaml [NFC] mv llvm/test/tools/obj2yaml/macho-DWARF-debug-ranges.yaml llvm/test/ObjectYAML/MachO/DWARF-debug_ranges.yaml 2020-06-14 16:39:15 +08:00
opt-viewer
sancov [sancov] Accommodate sancov and coverage report server for use under Windows 2020-05-26 14:36:44 -07:00
sanstats
UpdateTestChecks [utils] change default nameless value to "TMP" 2020-06-01 06:54:45 -04:00
yaml2obj [DWARFYAML][test] Use --ignore-case to suppress errors. 2020-07-03 23:46:37 +08:00