mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-10 21:06:33 +03:00
bindInstaces
This commit is contained in:
parent
e453edcc6a
commit
bdc5f65070
3 changed files with 35 additions and 1 deletions
|
@ -154,6 +154,18 @@ void JITContext::reset() {
|
|||
}
|
||||
}
|
||||
|
||||
void JITContext::registerBind(void *handle, void *originalFunc,
|
||||
const llvm::ArrayRef<Slice> ¶ms) {
|
||||
assert(bindInstances.count(handle) == 0);
|
||||
BindDesc::ParamsVec vec(params.begin(), params.end());
|
||||
bindInstances.insert({handle, {originalFunc, std::move(vec)}});
|
||||
}
|
||||
|
||||
void JITContext::unregisterBind(void *handle) {
|
||||
assert(bindInstances.count(handle) == 1);
|
||||
bindInstances.erase(handle);
|
||||
}
|
||||
|
||||
void JITContext::removeModule(const ModuleHandleT &handle) {
|
||||
cantFail(compileLayer.removeModule(handle));
|
||||
#if LDC_LLVM_VER >= 700
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue