[Lldb-commits] [lldb] r232043 - Removed an unused global variable.

Hafiz Abid Qadeer hafiz_abid at mentor.com
Thu Mar 12 07:54:44 PDT 2015


Author: abidh
Date: Thu Mar 12 09:54:44 2015
New Revision: 232043

URL: http://llvm.org/viewvc/llvm-project?rev=232043&view=rev
Log:
Removed an unused global variable.

This variable "g_debugger_name" is not used anywhere. It also causes a warning.
I was first going to change its type to fix the warning then noticed that it 
is not being used. So removing it.

Committed as Obvious. 


Modified:
    lldb/trunk/tools/driver/Driver.cpp
    lldb/trunk/tools/lldb-mi/Driver.cpp

Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=232043&r1=232042&r2=232043&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Thu Mar 12 09:54:44 2015
@@ -51,7 +51,6 @@ static void reset_stdin_termios ();
 static bool g_old_stdin_termios_is_valid = false;
 static struct termios g_old_stdin_termios;
 
-static char *g_debugger_name =  (char *) "";
 static Driver *g_driver = NULL;
 
 // In the Driver::MainLoop, we change the terminal settings.  This function is
@@ -146,16 +145,12 @@ Driver::Driver () :
     // We want to be able to handle CTRL+D in the terminal to have it terminate
     // certain input
     m_debugger.SetCloseInputOnEOF (false);
-    g_debugger_name = (char *) m_debugger.GetInstanceName();
-    if (g_debugger_name == NULL)
-        g_debugger_name = (char *) "";
     g_driver = this;
 }
 
 Driver::~Driver ()
 {
     g_driver = NULL;
-    g_debugger_name = NULL;
 }
 
 

Modified: lldb/trunk/tools/lldb-mi/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/Driver.cpp?rev=232043&r1=232042&r2=232043&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/Driver.cpp (original)
+++ lldb/trunk/tools/lldb-mi/Driver.cpp Thu Mar 12 09:54:44 2015
@@ -44,7 +44,6 @@ static void reset_stdin_termios();
 static bool g_old_stdin_termios_is_valid = false;
 static struct termios g_old_stdin_termios;
 
-static char *g_debugger_name = (char *)"";
 Driver *g_driver = NULL;
 
 // In the Driver::MainLoop, we change the terminal settings.  This function is
@@ -128,16 +127,12 @@ Driver::Driver()
     // We want to be able to handle CTRL+D in the terminal to have it terminate
     // certain input
     m_debugger.SetCloseInputOnEOF(false);
-    g_debugger_name = (char *)m_debugger.GetInstanceName();
-    if (g_debugger_name == NULL)
-        g_debugger_name = (char *)"";
     g_driver = this;
 }
 
 Driver::~Driver()
 {
     g_driver = NULL;
-    g_debugger_name = NULL;
 }
 
 // This function takes INDENT, which tells how many spaces to output at the front





More information about the lldb-commits mailing list