[Lldb-commits] [PATCH] D68444: remove a smattering of isolated, unnecessary uses of FILE*

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 4 01:36:15 PDT 2019


labath added inline comments.


================
Comment at: lldb/source/Core/IOHandler.cpp:332
+          if (m_output_sp) {
+            m_output_sp->GetFile().Printf("%s", prompt);
+            m_output_sp->Flush();
----------------
It looks like this could actually use the `Stream` interface to write this stuff (*m_output_sp << prompt). Ideally, I guess we wouldn't even have formatted output capabilities on the File class, and things would always go through streams for stuff like this..


================
Comment at: lldb/source/Core/IOHandler.cpp:493
+        if (m_output_sp) {
+          m_output_sp->GetFile().Printf(
+              "%u%s", m_base_line_number + (uint32_t)lines.GetSize(),
----------------
same here.


================
Comment at: lldb/source/Expression/REPL.cpp:426
         if (extra_line) {
-          fprintf(output_sp->GetFile().GetStream(), "\n");
+          output_sp->GetFile().Printf("\n");
         }
----------------
and here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68444/new/

https://reviews.llvm.org/D68444





More information about the lldb-commits mailing list