remove unused method ResetOutputFileHandle()
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 25 Sep 2019 01:29:41 +0000 (01:29 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 25 Sep 2019 01:29:41 +0000 (01:29 +0000)
ResetOutputFileHandle() isn't being used by anything. Also it's using
FILE*, which is something we should be doing less of. Remove it.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D68001

llvm-svn: 372800

lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/source/Core/Debugger.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h

index c8fa3901350d7fb91e7d47ed19d3c4cf84f2e058..44c7554910ecc48755be273f7d71f047f8cd989a 100644 (file)
@@ -463,8 +463,6 @@ public:
 
   static lldb::ScriptLanguage StringToLanguage(const llvm::StringRef &string);
 
-  virtual void ResetOutputFileHandle(FILE *new_fh) {} // By default, do nothing.
-
   lldb::ScriptLanguage GetLanguage() { return m_script_lang; }
 
 protected:
index 2e293f57c81c70e54d64b046cf037ec800bb5b10..5938c5cfcc2c8716ca722b9549e228ca55c23234 100644 (file)
@@ -851,11 +851,6 @@ void Debugger::SetOutputFileHandle(FILE *fh, bool tranfer_ownership) {
   if (!out_file.IsValid())
     out_file.SetStream(stdout, false);
 
-  // Do not create the ScriptInterpreter just for setting the output file
-  // handle as the constructor will know how to do the right thing on its own.
-  if (ScriptInterpreter *script_interpreter =
-          GetScriptInterpreter(/*can_create=*/false))
-    script_interpreter->ResetOutputFileHandle(fh);
 }
 
 void Debugger::SetErrorFileHandle(FILE *fh, bool tranfer_ownership) {
index 25a81f65115b60c97e181ccb1feef2e26bcfcc76..e8af9db2ce466248ab4635aa425a58235dcb96d4 100644 (file)
@@ -609,8 +609,6 @@ ScriptInterpreterPythonImpl::CreateInstance(Debugger &debugger) {
   return std::make_shared<ScriptInterpreterPythonImpl>(debugger);
 }
 
-void ScriptInterpreterPythonImpl::ResetOutputFileHandle(FILE *fh) {}
-
 void ScriptInterpreterPythonImpl::LeaveSession() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT));
   if (log)
index e24d2540712b0c2f5a70971afaf8475f057f675b..e81c3b0851fdc56ca6dad11500969153daa2265b 100644 (file)
@@ -254,8 +254,6 @@ public:
   void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
                                     const char *oneliner) override;
 
-  void ResetOutputFileHandle(FILE *new_fh) override;
-
   const char *GetDictionaryName() { return m_dictionary_name.c_str(); }
 
   PyThreadState *GetThreadState() { return m_command_thread_state; }