Author: Adrian Prantl Date: 2020-08-17T14:42:25-07:00 New Revision: a1a3b86910e49bba5fb3dbbccc44f46e5619701e
URL: https://github.com/llvm/llvm-project/commit/a1a3b86910e49bba5fb3dbbccc44f46e5619701e DIFF: https://github.com/llvm/llvm-project/commit/a1a3b86910e49bba5fb3dbbccc44f46e5619701e.diff LOG: Convert to early exit (NFC) Added: Modified: lldb/source/Target/Target.cpp Removed: ################################################################################ diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 31016f7f943c..aab9097458c9 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -2919,23 +2919,23 @@ Status Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) { switch (m_process_sp->WaitForProcessToStop(llvm::None, nullptr, false, hijack_listener_sp, nullptr)) { case eStateStopped: { - if (!launch_info.GetFlags().Test(eLaunchFlagStopAtEntry)) { - if (synchronous_execution) { - // Now we have handled the stop-from-attach, and we are just - // switching to a synchronous resume. So we should switch to the - // SyncResume hijacker. - m_process_sp->RestoreProcessEvents(); - m_process_sp->ResumeSynchronous(stream); - } else { - m_process_sp->RestoreProcessEvents(); - error = m_process_sp->PrivateResume(); - } - if (!error.Success()) { - Status error2; - error2.SetErrorStringWithFormat( - "process resume at entry point failed: %s", error.AsCString()); - error = error2; - } + if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry)) + break; + if (synchronous_execution) { + // Now we have handled the stop-from-attach, and we are just + // switching to a synchronous resume. So we should switch to the + // SyncResume hijacker. + m_process_sp->RestoreProcessEvents(); + m_process_sp->ResumeSynchronous(stream); + } else { + m_process_sp->RestoreProcessEvents(); + error = m_process_sp->PrivateResume(); + } + if (!error.Success()) { + Status error2; + error2.SetErrorStringWithFormat( + "process resume at entry point failed: %s", error.AsCString()); + error = error2; } } break; case eStateExited: { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits