[llvm] c67148d - [ORC] Add note to call endSession to assertion messages.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 16:34:05 PST 2025
Author: Lang Hames
Date: 2025-02-05T11:33:28+11:00
New Revision: c67148d8460c7c106c9137b3d4dfdf989de82a4a
URL: https://github.com/llvm/llvm-project/commit/c67148d8460c7c106c9137b3d4dfdf989de82a4a
DIFF: https://github.com/llvm/llvm-project/commit/c67148d8460c7c106c9137b3d4dfdf989de82a4a.diff
LOG: [ORC] Add note to call endSession to assertion messages.
The most likely cause of these assertions is a failure to call endSession. The
new message should clients spot the issue more easily.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp
llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp
index b4f78c617ae788..1bb444077ad150 100644
--- a/llvm/lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp
@@ -499,7 +499,10 @@ LinkGraphLinkingLayer::LinkGraphLinkingLayer(
}
LinkGraphLinkingLayer::~LinkGraphLinkingLayer() {
- assert(Allocs.empty() && "Layer destroyed with resources still attached");
+ assert(Allocs.empty() &&
+ "Layer destroyed with resources still attached "
+ "(ExecutionSession::endSession() must be called prior to "
+ "destruction)");
getExecutionSession().deregisterResourceManager(*this);
}
diff --git a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
index a73b2310d193aa..88cceacb71184d 100644
--- a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
@@ -88,7 +88,10 @@ RTDyldObjectLinkingLayer::RTDyldObjectLinkingLayer(
}
RTDyldObjectLinkingLayer::~RTDyldObjectLinkingLayer() {
- assert(MemMgrs.empty() && "Layer destroyed with resources still attached");
+ assert(MemMgrs.empty() &&
+ "Layer destroyed with resources still attached"
+ "(ExecutionSession::endSession() must be called prior to "
+ "destruction)");
}
void RTDyldObjectLinkingLayer::emit(
More information about the llvm-commits
mailing list