Commit a6faf851 authored by Jonas Devlieghere's avatar Jonas Devlieghere
Browse files

[lldb/CommandInterpreter] Remove flag that's always true (NFC)

The 'asynchronously' argument to both GetLLDBCommandsFromIOHandler and
GetPythonCommandsFromIOHandler is true for all call sites. This commit
simplifies the API by dropping it and giving the baton a default
argument.
parent c42116cc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -428,13 +428,14 @@ public:

  void RunCommandInterpreter(bool auto_handle_events, bool spawn_thread,
                             CommandInterpreterRunOptions &options);

  void GetLLDBCommandsFromIOHandler(const char *prompt,
                                    IOHandlerDelegate &delegate,
                                    bool asynchronously, void *baton);
                                    void *baton = nullptr);

  void GetPythonCommandsFromIOHandler(const char *prompt,
                                      IOHandlerDelegate &delegate,
                                      bool asynchronously, void *baton);
                                      void *baton = nullptr);

  const char *GetCommandPrefix();

+0 −1
Original line number Diff line number Diff line
@@ -256,7 +256,6 @@ are no syntax errors may indicate that a function was declared but never called.
    m_interpreter.GetLLDBCommandsFromIOHandler(
        "> ",             // Prompt
        *this,            // IOHandlerDelegate
        true,             // Run IOHandler in async mode
        &bp_options_vec); // Baton for the "io_handler" that will be passed back
                          // into our IOHandlerDelegate functions
  }
+2 −5
Original line number Diff line number Diff line
@@ -1651,10 +1651,7 @@ protected:
      if (m_options.m_funct_name.empty()) {
        m_interpreter.GetPythonCommandsFromIOHandler(
            "     ", // Prompt
            *this,    // IOHandlerDelegate
            true,     // Run IOHandler in async mode
            nullptr); // Baton for the "io_handler" that will be passed back
                      // into our IOHandlerDelegate functions
            *this);  // IOHandlerDelegate
      } else {
        CommandObjectSP new_cmd(new CommandObjectPythonFunction(
            m_interpreter, m_cmd_name, m_options.m_funct_name,
+2 −6
Original line number Diff line number Diff line
@@ -4686,12 +4686,8 @@ protected:
                                     new_hook_sp->GetID());
    } else {
      m_stop_hook_sp = new_hook_sp;
      m_interpreter.GetLLDBCommandsFromIOHandler(
          "> ",     // Prompt
          *this,    // IOHandlerDelegate
          true,     // Run IOHandler in async mode
          nullptr); // Baton for the "io_handler" that will be passed back
                    // into our IOHandlerDelegate functions
      m_interpreter.GetLLDBCommandsFromIOHandler("> ",   // Prompt
                                                 *this); // IOHandlerDelegate
    }
    result.SetStatus(eReturnStatusSuccessFinishNoResult);

+0 −2
Original line number Diff line number Diff line
@@ -1332,7 +1332,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
    m_interpreter.GetPythonCommandsFromIOHandler(
        "    ",   // Prompt
        *this,    // IOHandlerDelegate
        true,     // Run IOHandler in async mode
        options); // Baton for the "io_handler" that will be passed back into
                  // our IOHandlerDelegate functions
    result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -2232,7 +2231,6 @@ bool CommandObjectTypeSynthAdd::Execute_HandwritePython(
  m_interpreter.GetPythonCommandsFromIOHandler(
      "    ",   // Prompt
      *this,    // IOHandlerDelegate
      true,     // Run IOHandler in async mode
      options); // Baton for the "io_handler" that will be passed back into our
                // IOHandlerDelegate functions
  result.SetStatus(eReturnStatusSuccessFinishNoResult);
Loading