diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-09 21:50:52 +0000 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-09 21:50:52 +0000 |
commit | 5da2bc22badde8748a71b1e8ad1ef0bd8e2ce386 (patch) | |
tree | f8aa7c86eb9af03b4a32a1f0fa2abe2a2be1df9e /lldb/source/Core/IOHandler.cpp | |
parent | 9eb13719236458cd0c035ebbe882cfbf0add7bfc (diff) | |
download | bcm5719-llvm-5da2bc22badde8748a71b1e8ad1ef0bd8e2ce386.tar.gz bcm5719-llvm-5da2bc22badde8748a71b1e8ad1ef0bd8e2ce386.zip |
remove a smattering of isolated, unnecessary uses of FILE*
Summary:
There a a few call sites that use FILE* which are easy to
fix without disrupting anything else.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: JDevlieghere, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68444
llvm-svn: 374239
Diffstat (limited to 'lldb/source/Core/IOHandler.cpp')
-rw-r--r-- | lldb/source/Core/IOHandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 350a5383507..d3152981a56 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -329,10 +329,9 @@ bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) { prompt = GetPrompt(); if (prompt && prompt[0]) { - FILE *out = GetOutputFILE(); - if (out) { - ::fprintf(out, "%s", prompt); - ::fflush(out); + if (m_output_sp) { + m_output_sp->Printf("%s", prompt); + m_output_sp->Flush(); } } } @@ -491,10 +490,11 @@ bool IOHandlerEditline::GetLines(StringList &lines, bool &interrupted) { // Show line numbers if we are asked to std::string line; if (m_base_line_number > 0 && GetIsInteractive()) { - FILE *out = GetOutputFILE(); - if (out) - ::fprintf(out, "%u%s", m_base_line_number + (uint32_t)lines.GetSize(), - GetPrompt() == nullptr ? " " : ""); + if (m_output_sp) { + m_output_sp->Printf("%u%s", + m_base_line_number + (uint32_t)lines.GetSize(), + GetPrompt() == nullptr ? " " : ""); + } } m_curr_line_idx = lines.GetSize(); |