diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2016-04-18 13:57:08 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2016-04-18 13:57:08 +0000 |
| commit | ca94d0ec0c1298fec7f3bd5d8e7d537f9efd6142 (patch) | |
| tree | e039d0fe888f2c3a631b3bf6aba661a86d8d12df /llvm/tools | |
| parent | dd2ca837959c74dcf0bd602748041507597f0493 (diff) | |
| download | bcm5719-llvm-ca94d0ec0c1298fec7f3bd5d8e7d537f9efd6142.tar.gz bcm5719-llvm-ca94d0ec0c1298fec7f3bd5d8e7d537f9efd6142.zip | |
Revert 266581 (and follow-up 266588), it doesn't build on Windows.
Three problems:
1. <future> can't be easily used. If you must use it, see
include/Support/ThreadPool.h for how.
2. constexpr problems, even after 266588.
3. Move assignment operators can't be defaulted in MSVC2013.
llvm-svn: 266615
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/lli/ChildTarget/ChildTarget.cpp | 6 | ||||
| -rw-r--r-- | llvm/tools/lli/RemoteJITUtils.h | 1 | ||||
| -rw-r--r-- | llvm/tools/lli/lli.cpp | 21 |
3 files changed, 12 insertions, 16 deletions
diff --git a/llvm/tools/lli/ChildTarget/ChildTarget.cpp b/llvm/tools/lli/ChildTarget/ChildTarget.cpp index 33de1850547..93925d6aa87 100644 --- a/llvm/tools/lli/ChildTarget/ChildTarget.cpp +++ b/llvm/tools/lli/ChildTarget/ChildTarget.cpp @@ -54,8 +54,8 @@ int main(int argc, char *argv[]) { JITServer Server(Channel, SymbolLookup, RegisterEHFrames, DeregisterEHFrames); while (1) { - JITServer::JITFuncId Id = JITServer::InvalidId; - if (auto EC = Server.getNextFuncId(Id)) { + JITServer::JITProcId Id = JITServer::InvalidId; + if (auto EC = Server.getNextProcId(Id)) { errs() << "Error: " << EC.message() << "\n"; return 1; } @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { case JITServer::TerminateSessionId: return 0; default: - if (auto EC = Server.handleKnownFunction(Id)) { + if (auto EC = Server.handleKnownProcedure(Id)) { errs() << "Error: " << EC.message() << "\n"; return 1; } diff --git a/llvm/tools/lli/RemoteJITUtils.h b/llvm/tools/lli/RemoteJITUtils.h index 63915d13dde..d5488ad555c 100644 --- a/llvm/tools/lli/RemoteJITUtils.h +++ b/llvm/tools/lli/RemoteJITUtils.h @@ -16,7 +16,6 @@ #include "llvm/ExecutionEngine/Orc/RPCChannel.h" #include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include <mutex> #if !defined(_MSC_VER) && !defined(__MINGW32__) #include <unistd.h> diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index ce99b6ac7a0..0f30a4a5ff0 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -582,7 +582,7 @@ int main(int argc, char **argv, char * const *envp) { // Reset errno to zero on entry to main. errno = 0; - int Result = -1; + int Result; // Sanity check use of remote-jit: LLI currently only supports use of the // remote JIT on Unix platforms. @@ -681,13 +681,12 @@ int main(int argc, char **argv, char * const *envp) { static_cast<ForwardingMemoryManager*>(RTDyldMM)->setResolver( orc::createLambdaResolver( [&](const std::string &Name) { - if (auto AddrOrErr = R->getSymbolAddress(Name)) - return RuntimeDyld::SymbolInfo(*AddrOrErr, JITSymbolFlags::Exported); - else { - errs() << "Failure during symbol lookup: " - << AddrOrErr.getError().message() << "\n"; - exit(1); - } + orc::TargetAddress Addr = 0; + if (auto EC = R->getSymbolAddress(Addr, Name)) { + errs() << "Failure during symbol lookup: " << EC.message() << "\n"; + exit(1); + } + return RuntimeDyld::SymbolInfo(Addr, JITSymbolFlags::Exported); }, [](const std::string &Name) { return nullptr; } )); @@ -699,10 +698,8 @@ int main(int argc, char **argv, char * const *envp) { EE->finalizeObject(); DEBUG(dbgs() << "Executing '" << EntryFn->getName() << "' at 0x" << format("%llx", Entry) << "\n"); - if (auto ResultOrErr = R->callIntVoid(Entry)) - Result = *ResultOrErr; - else - errs() << "ERROR: " << ResultOrErr.getError().message() << "\n"; + if (auto EC = R->callIntVoid(Result, Entry)) + errs() << "ERROR: " << EC.message() << "\n"; // Like static constructors, the remote target MCJIT support doesn't handle // this yet. It could. FIXME. |

