Author: jdevlieghere Date: Tue Sep 24 18:29:41 2019 New Revision: 372800 URL: http://llvm.org/viewvc/llvm-project?rev=372800&view=rev Log: remove unused method ResetOutputFileHandle()
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 Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h?rev=372800&r1=372799&r2=372800&view=diff ============================================================================== --- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Tue Sep 24 18:29:41 2019 @@ -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: Modified: lldb/trunk/source/Core/Debugger.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=372800&r1=372799&r2=372800&view=diff ============================================================================== --- lldb/trunk/source/Core/Debugger.cpp (original) +++ lldb/trunk/source/Core/Debugger.cpp Tue Sep 24 18:29:41 2019 @@ -851,11 +851,6 @@ void Debugger::SetOutputFileHandle(FILE 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) { Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=372800&r1=372799&r2=372800&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Tue Sep 24 18:29:41 2019 @@ -609,8 +609,6 @@ ScriptInterpreterPythonImpl::CreateInsta return std::make_shared<ScriptInterpreterPythonImpl>(debugger); } -void ScriptInterpreterPythonImpl::ResetOutputFileHandle(FILE *fh) {} - void ScriptInterpreterPythonImpl::LeaveSession() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); if (log) Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h?rev=372800&r1=372799&r2=372800&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h Tue Sep 24 18:29:41 2019 @@ -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; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits