Thanks to Nico Weber for the suggestion.
Details
Diff Detail
Event Timeline
Create the error for !LLDB_ENABLE_TERMIOS via a helper function, as suggested by Nico Weber.
Thanks!
lldb/source/Host/common/Terminal.cpp | ||
---|---|---|
32 | 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. |
lldb/source/Host/common/Terminal.cpp | ||
---|---|---|
32 | I think the goal was to avoid checking LLDB_ENABLE_TERMIOS in the header file, though I'm not sure if it was an explicit goal or one I've implicitly assumed. I've move the check inside for the time being. We can always change it later. |
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.