projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7c24665
)
The MCJITMemoryManager takes ownership of the JMM, so don't leak it.
author
Jim Grosbach
<grosbach@apple.com>
Tue, 18 Oct 2011 19:57:38 +0000
(19:57 +0000)
committer
Jim Grosbach
<grosbach@apple.com>
Tue, 18 Oct 2011 19:57:38 +0000
(19:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142410
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
patch
|
blob
|
history
diff --git
a/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
b/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
index 40bc031a07713da4e7d544815bb7c2f7b253458b..c17a39736ccca24e97ec3f977bf2cc404e92813b 100644
(file)
--- a/
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
+++ b/
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
@@
-27,6
+27,8
@@
class MCJITMemoryManager : public RTDyldMemoryManager {
Module *M;
public:
MCJITMemoryManager(JITMemoryManager *jmm, Module *m) : JMM(jmm), M(m) {}
+ // We own the JMM, so make sure to delete it.
+ ~MCJITMemoryManager() { delete JMM; }
// Allocate ActualSize bytes, or more, for the named function. Return
// a pointer to the allocated memory and update Size to reflect how much