forked from OSchip/llvm-project
[ORC] De-register eh-frames in the RTDyldObjectLinkingLayer destructor.
This matches the behavior of the legacy layer, which automatically deregistered frames.
This commit is contained in:
parent
a32f8dd195
commit
9f4f237e29
|
@ -54,6 +54,8 @@ public:
|
|||
RTDyldObjectLinkingLayer(ExecutionSession &ES,
|
||||
GetMemoryManagerFunction GetMemoryManager);
|
||||
|
||||
~RTDyldObjectLinkingLayer();
|
||||
|
||||
/// Emit the object.
|
||||
void emit(MaterializationResponsibility R,
|
||||
std::unique_ptr<MemoryBuffer> O) override;
|
||||
|
|
|
@ -78,6 +78,12 @@ RTDyldObjectLinkingLayer::RTDyldObjectLinkingLayer(
|
|||
ExecutionSession &ES, GetMemoryManagerFunction GetMemoryManager)
|
||||
: ObjectLayer(ES), GetMemoryManager(GetMemoryManager) {}
|
||||
|
||||
RTDyldObjectLinkingLayer::~RTDyldObjectLinkingLayer() {
|
||||
std::lock_guard<std::mutex> Lock(RTDyldLayerMutex);
|
||||
for (auto &MemMgr : MemMgrs)
|
||||
MemMgr->deregisterEHFrames();
|
||||
}
|
||||
|
||||
void RTDyldObjectLinkingLayer::emit(MaterializationResponsibility R,
|
||||
std::unique_ptr<MemoryBuffer> O) {
|
||||
assert(O && "Object must not be null");
|
||||
|
|
Loading…
Reference in New Issue