summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/ChildTarget/ChildTarget.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-01-14 22:02:03 +0000
committerLang Hames <lhames@gmail.com>2016-01-14 22:02:03 +0000
commit52c472416535ae31309009f9fc565506b38b2e17 (patch)
treed8c08a02ea5f85b28101e590e5fd89aa5d7b8864 /llvm/tools/lli/ChildTarget/ChildTarget.cpp
parent0d11212f004c9193dd1cb2b01a80d6934b5fb5f9 (diff)
downloadbcm5719-llvm-52c472416535ae31309009f9fc565506b38b2e17.tar.gz
bcm5719-llvm-52c472416535ae31309009f9fc565506b38b2e17.zip
[Orc] Add support for EH-frame registration to the Orc Remote Target utility
classes. OrcRemoteTargetClient::RCMemoryManager will now register EH frames with the server automatically. This allows remote-execution of code that uses exceptions. llvm-svn: 257816
Diffstat (limited to 'llvm/tools/lli/ChildTarget/ChildTarget.cpp')
-rw-r--r--llvm/tools/lli/ChildTarget/ChildTarget.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/tools/lli/ChildTarget/ChildTarget.cpp b/llvm/tools/lli/ChildTarget/ChildTarget.cpp
index 0b75e20f83e..93925d6aa87 100644
--- a/llvm/tools/lli/ChildTarget/ChildTarget.cpp
+++ b/llvm/tools/lli/ChildTarget/ChildTarget.cpp
@@ -41,9 +41,17 @@ int main(int argc, char *argv[]) {
return RTDyldMemoryManager::getSymbolAddressInProcess(Name);
};
+ auto RegisterEHFrames = [](uint8_t *Addr, uint32_t Size) {
+ RTDyldMemoryManager::registerEHFramesInProcess(Addr, Size);
+ };
+
+ auto DeregisterEHFrames = [](uint8_t *Addr, uint32_t Size) {
+ RTDyldMemoryManager::deregisterEHFramesInProcess(Addr, Size);
+ };
+
FDRPCChannel Channel(InFD, OutFD);
typedef remote::OrcRemoteTargetServer<FDRPCChannel, HostOrcArch> JITServer;
- JITServer Server(Channel, SymbolLookup);
+ JITServer Server(Channel, SymbolLookup, RegisterEHFrames, DeregisterEHFrames);
while (1) {
JITServer::JITProcId Id = JITServer::InvalidId;
OpenPOWER on IntegriCloud