diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-10-27 10:22:52 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-10-27 10:22:52 +0000 |
commit | 5bb014371ef8b1b082c517768dc7c75e1e8b9ec5 (patch) | |
tree | efc927dbfebcf771c3a12140be9f277e2705ba20 /llvm/tools/lli/RemoteMemoryManager.cpp | |
parent | 199c8235551c37b8a51a44c080f7fae1b7ab8884 (diff) | |
download | bcm5719-llvm-5bb014371ef8b1b082c517768dc7c75e1e8b9ec5.tar.gz bcm5719-llvm-5bb014371ef8b1b082c517768dc7c75e1e8b9ec5.zip |
MCJIT-remote: __main should be resolved in child context.
- Mark tests as XFAIL:cygming in test/ExecutionEngine/MCJIT/remote.
Rather to suppress them, I'd like to leave them running as XFAIL.
- Revert r193472. RecordMemoryManager no longer resolves __main on cygming.
There are a couple of issues.
- X86 Codegen emits "call __main" in @main for targeting cygming.
It is useless in JIT. FYI, tests are passing when emitting __main is disabled.
- Current remote JIT does not resolve any symbols in child context.
FIXME: __main should be disabled, or remote JIT should resolve __main.
llvm-svn: 193498
Diffstat (limited to 'llvm/tools/lli/RemoteMemoryManager.cpp')
-rw-r--r-- | llvm/tools/lli/RemoteMemoryManager.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/tools/lli/RemoteMemoryManager.cpp b/llvm/tools/lli/RemoteMemoryManager.cpp index f730f0984f4..04fc40e426f 100644 --- a/llvm/tools/lli/RemoteMemoryManager.cpp +++ b/llvm/tools/lli/RemoteMemoryManager.cpp @@ -204,19 +204,3 @@ uint8_t *RemoteMemoryManager::allocateGlobal(uintptr_t Size, unsigned Alignment) void RemoteMemoryManager::deallocateFunctionBody(void *Body) { llvm_unreachable("Unexpected!"); } - -static int jit_noop() { - return 0; -} - -uint64_t RemoteMemoryManager::getSymbolAddress(const std::string &Name) { - // We should not invoke parent's ctors/dtors from generated main()! - // On Mingw and Cygwin, the symbol __main is resolved to - // callee's(eg. tools/lli) one, to invoke wrong duplicated ctors - // (and register wrong callee's dtors with atexit(3)). - // We expect ExecutionEngine::runStaticConstructorsDestructors() - // is called before ExecutionEngine::runFunctionAsMain() is called. - if (Name == "__main") return (uintptr_t)&jit_noop; - - return 0; -} |