Skip to content

Commit

Permalink
remove unused method ResetOutputFileHandle()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JDevlieghere committed Sep 25, 2019
1 parent db90b39 commit 4d4a8ee
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions lldb/include/lldb/Interpreter/ScriptInterpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,6 @@ class ScriptInterpreter : public PluginInterface {

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:
Expand Down
5 changes: 0 additions & 5 deletions lldb/source/Core/Debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
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; }
Expand Down

0 comments on commit 4d4a8ee

Please sign in to comment.