[Lldb-commits] [PATCH] D48752: Quiet command regex instructions during batch execution

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 28 11:43:26 PST 2018


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Seems like we should just add a "bool interactive" as a second parameter to "IOHandlerActivated". Then it will be easy to find the other places that need to be fixed up.



================
Comment at: include/lldb/Core/IOHandler.h:201
 
   virtual void IOHandlerActivated(IOHandler &io_handler) {}
 
----------------
Maybe remove the function below and add a "bool interactive" as a second parameter to this function?


================
Comment at: source/Commands/CommandObjectCommands.cpp:983
 protected:
-  void IOHandlerActivated(IOHandler &io_handler) override {
+  void IOHandlerActivatedInteractively(IOHandler &io_handler) override {
     StreamFileSP output_sp(io_handler.GetOutputStreamFile());
----------------
See above inline comment about leaving the name the same but adding the "bool interactive" as a paramter


================
Comment at: source/Commands/CommandObjectCommands.cpp:985
     StreamFileSP output_sp(io_handler.GetOutputStreamFile());
     if (output_sp) {
+      output_sp->PutCString("Enter one or more sed substitution commands in "
----------------
If we make changes I requested above this would become:
```
if (output_sp && interactive)
```


================
Comment at: source/Core/IOHandler.cpp:335-337
   m_delegate.IOHandlerActivated(*this);
+  if (GetIsInteractive())
+    m_delegate.IOHandlerActivatedInteractively(*this);
----------------
```
m_delegate. IOHandlerActivated(*this, GetIsInteractive());
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D48752/new/

https://reviews.llvm.org/D48752





More information about the lldb-commits mailing list