[Lldb-commits] [PATCH] D58227: [lldb] [MainLoop] Remove redundant termination clause (NFCI)

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 14 02:59:02 PST 2019


mgorny created this revision.
mgorny added reviewers: krytarowski, labath.
mgorny added a project: LLDB.
Herald added a subscriber: abidh.

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').


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D58227

Files:
  lldb/source/Host/common/MainLoop.cpp


Index: lldb/source/Host/common/MainLoop.cpp
===================================================================
--- lldb/source/Host/common/MainLoop.cpp
+++ lldb/source/Host/common/MainLoop.cpp
@@ -380,9 +380,6 @@
       return error;
 
     impl.ProcessEvents();
-
-    if (m_terminate_request)
-      return Status();
   }
   return Status();
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58227.186806.patch
Type: text/x-patch
Size: 348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190214/6062fffa/attachment.bin>


More information about the lldb-commits mailing list