projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d18d69f
)
[ORC] Clear SymbolToDefinitionMap when materializing a MaterializationUnit.
author
Lang Hames
<lhames@gmail.com>
Sat, 29 Sep 2018 23:49:56 +0000
(23:49 +0000)
committer
Lang Hames
<lhames@gmail.com>
Sat, 29 Sep 2018 23:49:56 +0000
(23:49 +0000)
The map is inaccessible at this point, so we may as well reclaim the memory
early.
llvm-svn: 343395
llvm/lib/ExecutionEngine/Orc/Layer.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/ExecutionEngine/Orc/Layer.cpp
b/llvm/lib/ExecutionEngine/Orc/Layer.cpp
index
38afead
..
f74f1c8
100644
(file)
--- 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);