[Lldb-commits] [PATCH] D112632: [lldb] [Host/Terminal] Fix warnings with termios disabled

Nico Weber via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 28 18:47:23 PDT 2021


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Thanks!



================
Comment at: lldb/source/Host/common/Terminal.cpp:39
+
 llvm::Expected<Terminal::Data> Terminal::GetData() {
   if (!FileDescriptorIsValid())
----------------
nit: should GetData() even exist if `!LLDB_ENABLE_TERMIOS`? Looks like it's only called `#if LLDB_ENABLE_TERMIOS` now. Maybe the whole method definition should be inside an ifdef.

If it should keep existing, either move the !FileDescriptorIsValid() check into the #if inside it (imho preferred), or move all the callers of it outside that #if. The current mix is a bit self-inconsistent.


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

https://reviews.llvm.org/D112632



More information about the lldb-commits mailing list