forked from OSchip/llvm-project
<rdar://problem/12125274>
Intentionally leak the module list to avoid unnecessary freeing of modules + object files + symbol files when the program is exiting. llvm-svn: 164184
This commit is contained in:
parent
dfa424c593
commit
6f4d8af713
|
@ -643,8 +643,14 @@ ModuleList::GetIndexForModule (const Module *module) const
|
|||
static ModuleList &
|
||||
GetSharedModuleList ()
|
||||
{
|
||||
static ModuleList g_shared_module_list;
|
||||
return g_shared_module_list;
|
||||
// NOTE: Intentionally leak the module list so a program doesn't have to
|
||||
// cleanup all modules and object files as it exits. This just wastes time
|
||||
// doing a bunch of cleanup that isn't required.
|
||||
static ModuleList *g_shared_module_list = NULL;
|
||||
if (g_shared_module_list == NULL)
|
||||
g_shared_module_list = new ModuleList(); // <--- Intentional leak!!!
|
||||
|
||||
return *g_shared_module_list;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in New Issue