[Orc] Fix a bug in the compile callback manager: trampoline ids need to be fixed
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / IndirectionUtils.h
index 9436b82528efa651c5ba960b04114a3159adbe1f..50e9a4352dd7f50089626b2b945da5d4ad2cd0fe 100644 (file)
@@ -55,7 +55,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);
+    AvailableTrampolines.push_back(I->first - TargetT::CallSize);
     auto CallbackHandler = std::move(I->second);
     ActiveTrampolines.erase(I);