llvm-6502/test
Rafael Espindola 7edd010739 Improve error handling of getRelocationAddend.
This patch changes getRelocationAddend to use ErrorOr and considers it an error
to try to get the addend of a REL section.

If, for example, a x86_64 file has a REL section, that file is corrupted and
we should reject it.

Using ErrorOr is not ideal since we check the section type once per relocation
instead of once per section.

Checking once per section would involve getRelocationAddend just asserting and
callers checking the section before iterating over the relocations.

In any case, this is an improvement and includes a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240176 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 20:58:43 +00:00
..
Analysis [X86][SSE][CostModel] Fixed uitofp/sitofp cost target tests to specify sse2/avx2/avx512f directly instead of via a cpu model. 2015-06-18 21:26:01 +00:00
Assembler Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Bindings
Bitcode Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
BugPoint
CodeGen MIR Parser: report an error when a basic block isn't found. 2015-06-19 20:12:03 +00:00
DebugInfo Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
ExecutionEngine Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Feature Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
FileCheck
Instrumentation Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Integer
JitListener
Linker Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC Make all temporary symbols unnamed. 2015-06-19 12:16:55 +00:00
Object Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
Other Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
SymbolRewriter
TableGen Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
tools Improve the --expand-relocs handling of MachO. 2015-06-18 22:38:20 +00:00
Transforms [SLP] Vectorize for all-constant entries. 2015-06-19 17:40:15 +00:00
Unit
Verifier Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
YAMLParser YAML: Implement block scalar parsing. 2015-05-13 23:10:51 +00:00
.clang-format
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.cfg LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh