llvm-6502/lib/ExecutionEngine
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
..
IntelJITEvents Try to fix the build of IntelJITEventListener. 2015-06-01 02:18:14 +00:00
Interpreter Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
MCJIT Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
OProfileJIT [jitlistener] Remove unused code 2015-04-08 13:17:48 +00:00
Orc modules: Add explicit dependency on intrinsics_gen 2015-06-16 00:44:12 +00:00
RuntimeDyld Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
CMakeLists.txt modules: Add explicit dependency on intrinsics_gen 2015-06-16 00:44:12 +00:00
ExecutionEngine.cpp [ExecutionEngine] ArrayRefize argument passing. 2015-06-13 19:50:29 +00:00
ExecutionEngineBindings.cpp add missing dependency for ExecutionEngine lib 2015-06-01 21:56:56 +00:00
GDBRegistrationListener.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
LLVMBuild.txt add missing dependency for ExecutionEngine lib 2015-06-01 21:56:56 +00:00
Makefile [Orc] New JIT APIs. 2015-01-23 21:25:00 +00:00
SectionMemoryManager.cpp [Orc] Move SectionMemoryManager's implementation from MCJIT to ExecutionEngine. 2015-02-06 19:36:40 +00:00
TargetSelect.cpp Readdress r236990, use of static members on a non-static variable. 2015-05-11 22:20:48 +00:00