OSDN Git Service

[Orc] Fix a bug in the compile callback manager: trampoline ids need to be fixed
authorLang Hames <lhames@gmail.com>
Thu, 19 Feb 2015 01:31:25 +0000 (01:31 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 19 Feb 2015 01:31:25 +0000 (01:31 +0000)
up before returning them to the available pool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229806 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/IndirectionUtils.h

index 9436b82..50e9a43 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);