diff options
author | Lang Hames <lhames@gmail.com> | 2016-08-01 20:49:11 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2016-08-01 20:49:11 +0000 |
commit | ad4a911feac0150f6bc5400ee9a8732adfd35f36 (patch) | |
tree | 8bad2b7d3e29a6a018d970c25530c6cce02373a2 /llvm/tools/lli/lli.cpp | |
parent | 317d42c1eae27a05d1b9a7dbbc3c8a7036eaaf91 (diff) | |
download | bcm5719-llvm-ad4a911feac0150f6bc5400ee9a8732adfd35f36.tar.gz bcm5719-llvm-ad4a911feac0150f6bc5400ee9a8732adfd35f36.zip |
[ExecutionEngine][MCJIT][Orc] Replace RuntimeDyld::SymbolInfo with JITSymbol.
This patch replaces RuntimeDyld::SymbolInfo with JITSymbol: A symbol class
that is capable of lazy materialization (i.e. the symbol definition needn't be
emitted until the address is requested). This can be used to support common
and weak symbols in the JIT (though this is not implemented in this patch).
For consistency, RuntimeDyld::SymbolResolver is renamed to JITSymbolResolver.
For space efficiency a new class, JITEvaluatedSymbol, is introduced that
behaves like the old RuntimeDyld::SymbolInfo - i.e. it is just a pair of an
address and symbol flags. Instances of JITEvaluatedSymbol can be used in
symbol-tables to avoid paying the space cost of the materializer.
llvm-svn: 277386
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r-- | llvm/tools/lli/lli.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index 92de5da4721..be22cc927c2 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -669,15 +669,15 @@ int main(int argc, char **argv, char * const *envp) { [](const std::string &Name) { return nullptr; }, [&](const std::string &Name) { if (auto Addr = ExitOnErr(R.getSymbolAddress(Name))) - return RuntimeDyld::SymbolInfo(Addr, JITSymbolFlags::Exported); - return RuntimeDyld::SymbolInfo(nullptr); + return JITSymbol(Addr, JITSymbolFlags::Exported); + return JITSymbol(nullptr); } )); // Grab the target address of the JIT'd main function on the remote and call // it. // FIXME: argv and envp handling. - orc::TargetAddress Entry = EE->getFunctionAddress(EntryFn->getName().str()); + JITTargetAddress Entry = EE->getFunctionAddress(EntryFn->getName().str()); EE->finalizeObject(); DEBUG(dbgs() << "Executing '" << EntryFn->getName() << "' at 0x" << format("%llx", Entry) << "\n"); |