[Lldb-commits] [lldb] 3240000 - [lldb][NFC] Remove never read member variable IOHandler::m_editing

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 9 09:06:12 PDT 2021


Author: Raphael Isemann
Date: 2021-08-09T18:05:53+02:00
New Revision: 324000054652d47467d23b73ada5c8a599087167

URL: https://github.com/llvm/llvm-project/commit/324000054652d47467d23b73ada5c8a599087167
DIFF: https://github.com/llvm/llvm-project/commit/324000054652d47467d23b73ada5c8a599087167.diff

LOG: [lldb][NFC] Remove never read member variable IOHandler::m_editing

The last read access to this variable was removed in 2015 in
4446487d71c52a925c04acfcae44dec8a8d62e00 .

Added: 
    

Modified: 
    lldb/include/lldb/Core/IOHandler.h
    lldb/source/Core/IOHandler.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index 4a3b788e3ea16..7011dd1e8e047 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -442,8 +442,6 @@ class IOHandlerEditline : public IOHandler {
   bool m_multi_line;
   bool m_color_prompts;
   bool m_interrupt_exits;
-  bool m_editing; // Set to true when fetching a line manually (not using
-                  // libedit)
   std::string m_line_buffer;
 };
 

diff  --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index c6f05d43a2a70..c35b17990842f 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -251,8 +251,7 @@ IOHandlerEditline::IOHandlerEditline(
       m_delegate(delegate), m_prompt(), m_continuation_prompt(),
       m_current_lines_ptr(nullptr), m_base_line_number(line_number_start),
       m_curr_line_idx(UINT32_MAX), m_multi_line(multi_line),
-      m_color_prompts(color_prompts), m_interrupt_exits(true),
-      m_editing(false) {
+      m_color_prompts(color_prompts), m_interrupt_exits(true) {
   SetPrompt(prompt);
 
 #if LLDB_ENABLE_LIBEDIT
@@ -399,7 +398,6 @@ bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) {
   }
 
   if (!got_line && in) {
-    m_editing = true;
     while (!got_line) {
       char *r = fgets(buffer, sizeof(buffer), in);
 #ifdef _WIN32
@@ -425,7 +423,6 @@ bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) {
       m_line_buffer += buffer;
       got_line = SplitLine(m_line_buffer);
     }
-    m_editing = false;
   }
 
   if (got_line) {


        


More information about the lldb-commits mailing list