Move the Function*->allocated blocks map from the JITMemoryManager to the
authorJeffrey Yasskin <jyasskin@google.com>
Tue, 20 Oct 2009 18:13:21 +0000 (18:13 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Tue, 20 Oct 2009 18:13:21 +0000 (18:13 +0000)
commit1e8613212286a8066001c8a3f516da89d250e05d
tree54e080388248880f4bdad668c8963483f7470f03
parentf7a0c0de6d73df8f24438234485b7950323b3d44
Move the Function*->allocated blocks map from the JITMemoryManager to the
JITEmitter.

I'm gradually making Functions auto-remove themselves from the JIT when they're
destroyed. In this case, the Function needs to be removed from the JITEmitter,
but the map recording which Functions need to be removed lived behind the
JITMemoryManager interface, which made things difficult.

This patch replaces the deallocateMemForFunction(Function*) method with a pair
of methods deallocateFunctionBody(void *) and deallocateExceptionTable(void *)
corresponding to the two startFoo/endFoo pairs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84651 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/JITMemoryManager.h
lib/ExecutionEngine/JIT/JITEmitter.cpp
lib/ExecutionEngine/JIT/JITMemoryManager.cpp
unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp