diff options
| author | Lang Hames <lhames@gmail.com> | 2019-12-20 21:08:35 -0800 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2019-12-20 21:10:49 -0800 |
| commit | 9f4f237e29e7150dfcf04ae78fa287d2dc8d48e2 (patch) | |
| tree | e162e63d114e3f65937ed30820260e9bad72c05c /llvm/lib/ExecutionEngine | |
| parent | a32f8dd195866c2be95d7e71f311a805a6fed4cd (diff) | |
| download | bcm5719-llvm-9f4f237e29e7150dfcf04ae78fa287d2dc8d48e2.tar.gz bcm5719-llvm-9f4f237e29e7150dfcf04ae78fa287d2dc8d48e2.zip | |
[ORC] De-register eh-frames in the RTDyldObjectLinkingLayer destructor.
This matches the behavior of the legacy layer, which automatically deregistered
frames.
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp index 3344bd4d53f..a92264c0be1 100644 --- a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp @@ -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"); |

