diff options
author | Lang Hames <lhames@gmail.com> | 2018-09-29 23:49:56 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-09-29 23:49:56 +0000 |
commit | c3053e41bfcee50d80e3597452df55e2ecb4198a (patch) | |
tree | 3f08394918692f8617fa57a7d22a16d4b8242df6 /llvm/lib/ExecutionEngine/Orc | |
parent | d18d69f25a87d08b59de227ce6391f24bdfb49f1 (diff) | |
download | bcm5719-llvm-c3053e41bfcee50d80e3597452df55e2ecb4198a.tar.gz bcm5719-llvm-c3053e41bfcee50d80e3597452df55e2ecb4198a.zip |
[ORC] Clear SymbolToDefinitionMap when materializing a MaterializationUnit.
The map is inaccessible at this point, so we may as well reclaim the memory
early.
llvm-svn: 343395
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/Layer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Layer.cpp b/llvm/lib/ExecutionEngine/Orc/Layer.cpp index 38afead06d7..f74f1c8a7fb 100644 --- a/llvm/lib/ExecutionEngine/Orc/Layer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Layer.cpp @@ -76,6 +76,11 @@ BasicIRLayerMaterializationUnit::BasicIRLayerMaterializationUnit( void BasicIRLayerMaterializationUnit::materialize( MaterializationResponsibility R) { + // Throw away the SymbolToDefinition map: it's not usable after we hand + // off the module. + SymbolToDefinition.clear(); + + // If cloneToNewContextOnEmit is set, clone the module now. if (L.getCloneToNewContextOnEmit()) TSM = cloneToNewContext(TSM); |