Also unload modules that are queued for JITting.
This commit is contained in:
parent
e21b7319f3
commit
44ee56b7a1
@ -153,8 +153,13 @@ namespace cling {
|
||||
}
|
||||
|
||||
///\brief Unload a set of JIT symbols.
|
||||
void unloadFromJIT(Transaction::ExeUnloadHandle H) {
|
||||
m_JIT->removeModules((size_t)H.m_Opaque);
|
||||
void unloadFromJIT(llvm::Module* M,
|
||||
Transaction::ExeUnloadHandle H) {
|
||||
auto iMod = std::find(m_ModulesToJIT.begin(), m_ModulesToJIT.end(), M);
|
||||
if (iMod != m_ModulesToJIT.end())
|
||||
m_ModulesToJIT.erase(iMod);
|
||||
else
|
||||
m_JIT->removeModules((size_t)H.m_Opaque);
|
||||
}
|
||||
|
||||
///\brief Run the static initializers of all modules collected to far.
|
||||
|
@ -60,7 +60,7 @@ namespace cling {
|
||||
delete (*m_NestedTransactions)[i];
|
||||
}
|
||||
if (getExecutor())
|
||||
getExecutor()->unloadFromJIT(getExeUnloadHandle());
|
||||
getExecutor()->unloadFromJIT(m_Module.get(), getExeUnloadHandle());
|
||||
}
|
||||
|
||||
NamedDecl* Transaction::containsNamedDecl(llvm::StringRef name) const {
|
||||
|
Loading…
Reference in New Issue
Block a user