1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[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
This commit is contained in:
Lang Hames 2018-09-29 23:49:56 +00:00
parent ed714f2dc7
commit f18e8314d4

View File

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