[Lldb-commits] [lldb] r355466 - Replace debug-only assert with a plain old assert.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 5 17:07:45 PST 2019
Author: adrian
Date: Tue Mar 5 17:07:45 2019
New Revision: 355466
URL: http://llvm.org/viewvc/llvm-project?rev=355466&view=rev
Log:
Replace debug-only assert with a plain old assert.
Modified:
lldb/trunk/source/Interpreter/CommandObject.cpp
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=355466&r1=355465&r2=355466&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Tue Mar 5 17:07:45 2019
@@ -136,17 +136,15 @@ bool CommandObject::ParseOptions(Args &a
}
bool CommandObject::CheckRequirements(CommandReturnObject &result) {
-#ifdef LLDB_CONFIGURATION_DEBUG
// Nothing should be stored in m_exe_ctx between running commands as
// m_exe_ctx has shared pointers to the target, process, thread and frame and
// we don't want any CommandObject instances to keep any of these objects
// around longer than for a single command. Every command should call
- // CommandObject::Cleanup() after it has completed
- assert(m_exe_ctx.GetTargetPtr() == NULL);
- assert(m_exe_ctx.GetProcessPtr() == NULL);
- assert(m_exe_ctx.GetThreadPtr() == NULL);
- assert(m_exe_ctx.GetFramePtr() == NULL);
-#endif
+ // CommandObject::Cleanup() after it has completed.
+ assert(!m_exe_ctx.GetTargetPtr());
+ assert(!m_exe_ctx.GetProcessPtr());
+ assert(!m_exe_ctx.GetThreadPtr());
+ assert(!m_exe_ctx.GetFramePtr());
// Lock down the interpreter's execution context prior to running the command
// so we guarantee the selected target, process, thread and frame can't go
More information about the lldb-commits
mailing list