mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 07:31:53 +00:00
The MCJITMemoryManager takes ownership of the JMM, so don't leak it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7c24665390
commit
3326fc18c8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user