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:
Axel Naumann 2015-06-08 14:46:51 +02:00 committed by sftnight
parent 44ee56b7a1
commit 439869b8c2
2 changed files with 3 additions and 1 deletions

View File

@ -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]);
}

View File

@ -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;