[Orc] Move delta-handling for trampoline sizes into the resolver block.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / IndirectionUtils.h
index e9d3d34085db6692c54625cae3a56952f0c82ac5..6168684950ad8a743d1f5fcd4f9a3fc2e6fe9aa5 100644 (file)
@@ -56,7 +56,7 @@ public:
     // Moving the trampoline ID back to the available list first means there's at
     // least one available trampoline if the compile action triggers a request for
     // a new one.
-    AvailableTrampolines.push_back(I->first - TargetT::CallSize);
+    AvailableTrampolines.push_back(I->first);
     auto CallbackHandler = std::move(I->second);
     ActiveTrampolines.erase(I);
 
@@ -140,7 +140,7 @@ public:
   CompileCallbackInfo getCompileCallback(FunctionType &FT) {
     TargetAddress TrampolineAddr = getAvailableTrampolineAddr(FT.getContext());
     auto &CallbackHandler =
-      this->ActiveTrampolines[TrampolineAddr + TargetT::CallSize];
+      this->ActiveTrampolines[TrampolineAddr];
     Constant *AddrIntVal =
       ConstantInt::get(Type::getInt64Ty(FT.getContext()), TrampolineAddr);
     Constant *AddrPtrVal =