llvm-6502/tools
Lang Hames 7acaefabf6 [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme.
Previously, when loading an object file, RuntimeDyld (1) took ownership of the
ObjectFile instance (and associated MemoryBuffer), (2) potentially modified the
object in-place, and (3) returned an ObjectImage that managed ownership of the
now-modified object and provided some convenience methods. This scheme accreted
over several years as features were tacked on to RuntimeDyld, and was both
unintuitive and unsafe (See e.g. http://llvm.org/PR20722).

This patch fixes the issue by removing all ownership and in-place modification
of object files from RuntimeDyld. Existing behavior, including debugger
registration, is preserved.

Noteworthy changes include:

(1) ObjectFile instances are now passed to RuntimeDyld by const-ref.
(2) The ObjectImage and ObjectBuffer classes have been removed entirely, they
    existed to model ownership within RuntimeDyld, and so are no longer needed.
(3) RuntimeDyld::loadObject now returns an instance of a new class,
    RuntimeDyld::LoadedObjectInfo, which can be used to construct a modified
    object suitable for registration with the debugger, following the existing
    debugger registration scheme.
(4) The JITRegistrar class has been removed, and the GDBRegistrar class has been
    re-written as a JITEventListener.

This should fix http://llvm.org/PR20722 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222810 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 06:53:26 +00:00
..
bugpoint Fix style. 2014-11-07 21:30:36 +00:00
bugpoint-passes
gold gold plugin: call llvm_shutdown so that -stats works. 2014-11-25 20:52:49 +00:00
llc
lli [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme. 2014-11-26 06:53:26 +00:00
llvm-ar Remove unused variable. 2014-11-07 21:33:09 +00:00
llvm-as
llvm-bcanalyzer
llvm-c-test [CMake] llvm-c-test: Use libLLVM.so if it is available. 2014-11-10 15:04:26 +00:00
llvm-config
llvm-cov llvm-cov: Sink some reporting logic into CoverageMapping 2014-11-14 01:50:32 +00:00
llvm-diff
llvm-dis
llvm-dwarfdump Reapply "[dwarfdump] Add support for dumping accelerator tables." 2014-11-14 16:15:53 +00:00
llvm-extract Remove redundant calls to isMaterializable. 2014-11-01 16:46:18 +00:00
llvm-go
llvm-jitlistener [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme. 2014-11-26 06:53:26 +00:00
llvm-link Make it easier to pass a custom diagnostic handler to the IR linker. 2014-10-27 23:02:10 +00:00
llvm-lto
llvm-mc Remove the now unused StringRefMemoryObject.h. 2014-11-12 02:13:27 +00:00
llvm-mcmarkup
llvm-nm Object, COFF: Cleanup symbol type code, improve binutils compatibility 2014-10-31 05:07:00 +00:00
llvm-objdump Fix Use-of-uninitialized-value for adrp_addr and adrp_inst in MachODump.cpp 2014-11-19 20:20:16 +00:00
llvm-profdata Use ErrorOr for the ::create factory on instrumented and sample profilers. 2014-11-03 00:51:45 +00:00
llvm-readobj Correctly handle Tag_CPU_arch_profile. 2014-11-25 09:30:09 +00:00
llvm-rtdyld [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme. 2014-11-26 06:53:26 +00:00
llvm-shlib [CMake] llvm-shlib: Prune redundant components, AsmPrinter, MC, and SelectionDAG. 2014-11-11 07:57:25 +00:00
llvm-size
llvm-stress
llvm-symbolizer llvm-symbolizer: teach it about PowerPC64 ELF function descriptors 2014-11-07 09:08:39 +00:00
llvm-vtabledump llvm-vtabledump: Handle Itanium VTables 2014-11-03 07:23:25 +00:00
lto libLTO: Allow linker to choose context of modules and codegen 2014-11-11 23:19:23 +00:00
macho-dump
msbuild
obj2yaml obj2yaml, yaml2obj: Add support for COFF executables 2014-11-14 08:15:42 +00:00
opt Make StringSet::insert return pair<iterator, bool> like other self-associative containers 2014-11-19 02:56:00 +00:00
verify-uselistorder
yaml2obj Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
CMakeLists.txt [CMake] Move llvm-shlib in prior to other tools. 2014-11-10 15:03:02 +00:00
LLVMBuild.txt
Makefile