Skip to content

Commit 4d4a8ee

Browse files
committed
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 llvm-svn: 372800
1 parent db90b39 commit 4d4a8ee

File tree

4 files changed

+0
-11
lines changed

4 files changed

+0
-11
lines changed

lldb/include/lldb/Interpreter/ScriptInterpreter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,6 @@ class ScriptInterpreter : public PluginInterface {
463463

464464
static lldb::ScriptLanguage StringToLanguage(const llvm::StringRef &string);
465465

466-
virtual void ResetOutputFileHandle(FILE *new_fh) {} // By default, do nothing.
467-
468466
lldb::ScriptLanguage GetLanguage() { return m_script_lang; }
469467

470468
protected:

lldb/source/Core/Debugger.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,11 +851,6 @@ void Debugger::SetOutputFileHandle(FILE *fh, bool tranfer_ownership) {
851851
if (!out_file.IsValid())
852852
out_file.SetStream(stdout, false);
853853

854-
// Do not create the ScriptInterpreter just for setting the output file
855-
// handle as the constructor will know how to do the right thing on its own.
856-
if (ScriptInterpreter *script_interpreter =
857-
GetScriptInterpreter(/*can_create=*/false))
858-
script_interpreter->ResetOutputFileHandle(fh);
859854
}
860855

861856
void Debugger::SetErrorFileHandle(FILE *fh, bool tranfer_ownership) {

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,6 @@ ScriptInterpreterPythonImpl::CreateInstance(Debugger &debugger) {
609609
return std::make_shared<ScriptInterpreterPythonImpl>(debugger);
610610
}
611611

612-
void ScriptInterpreterPythonImpl::ResetOutputFileHandle(FILE *fh) {}
613-
614612
void ScriptInterpreterPythonImpl::LeaveSession() {
615613
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT));
616614
if (log)

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,6 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
254254
void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
255255
const char *oneliner) override;
256256

257-
void ResetOutputFileHandle(FILE *new_fh) override;
258-
259257
const char *GetDictionaryName() { return m_dictionary_name.c_str(); }
260258

261259
PyThreadState *GetThreadState() { return m_command_thread_state; }

0 commit comments

Comments
 (0)