Use magic ExeUnload handle to tag "nothing to be unloaded".
This disambiguates a transaction without JITted module from one with JITted code. Only the latter should be unloaded.
This commit is contained in:
parent
44ee56b7a1
commit
439869b8c2
@ -237,6 +237,8 @@ size_t IncrementalJIT::addModules(std::vector<llvm::Module*>&& modules) {
|
||||
|
||||
|
||||
void IncrementalJIT::removeModules(size_t handle) {
|
||||
if (handle == (size_t)-1)
|
||||
return;
|
||||
m_LazyEmitLayer.removeModuleSet(m_UnloadPoints[handle]);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ namespace cling {
|
||||
m_IssuedDiags = kNone;
|
||||
m_Opts = CompilationOptions();
|
||||
m_Module = 0;
|
||||
m_ExeUnload = {0};
|
||||
m_ExeUnload = {(void*)(size_t)-1};
|
||||
m_WrapperFD = 0;
|
||||
m_Next = 0;
|
||||
//m_Sema = S;
|
||||
|
Loading…
x
Reference in New Issue
Block a user