Support unregistering exception frames of functions when they are removed.

Patch by Johannes Schaub!

Fixes PR8548


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127047 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2011-03-04 23:37:39 +00:00
parent b1939d5db6
commit 515c67ee77
3 changed files with 25 additions and 9 deletions

View File

@@ -79,9 +79,10 @@ ExecutionEngine::~ExecutionEngine() {
void ExecutionEngine::DeregisterAllTables() {
if (ExceptionTableDeregister) {
for (std::vector<void*>::iterator it = AllExceptionTables.begin(),
ie = AllExceptionTables.end(); it != ie; ++it)
ExceptionTableDeregister(*it);
DenseMap<const Function*, void*>::iterator it = AllExceptionTables.begin();
DenseMap<const Function*, void*>::iterator ite = AllExceptionTables.end();
for (; it != ite; ++it)
ExceptionTableDeregister(it->second);
AllExceptionTables.clear();
}
}