[Lldb-commits] [lldb] r354050 - [lldb] [MainLoop] Remove redundant termination clause (NFCI)

Michal Gorny via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 14 10:51:21 PST 2019


Author: mgorny
Date: Thu Feb 14 10:51:21 2019
New Revision: 354050

URL: http://llvm.org/viewvc/llvm-project?rev=354050&view=rev
Log:
[lldb] [MainLoop] Remove redundant termination clause (NFCI)

Remove the redundant termination clause from within the loop.  Since
the check is done at the end of the loop, it's entirely redundant
to the 'while' condition.  If termination was requested, the latter
will become false and the 'while' loop will terminate, resulting
in the 'return' statement below the loop being executed (which is
equivalent to the one used inside 'if').

Differential Revision: https://reviews.llvm.org/D58227

Modified:
    lldb/trunk/source/Host/common/MainLoop.cpp

Modified: lldb/trunk/source/Host/common/MainLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MainLoop.cpp?rev=354050&r1=354049&r2=354050&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/MainLoop.cpp (original)
+++ lldb/trunk/source/Host/common/MainLoop.cpp Thu Feb 14 10:51:21 2019
@@ -382,9 +382,6 @@ Status MainLoop::Run() {
       return error;
 
     impl.ProcessEvents();
-
-    if (m_terminate_request)
-      return Status();
   }
   return Status();
 }




More information about the lldb-commits mailing list