diff options
Diffstat (limited to 'lldb/source/Host/common/Terminal.cpp')
-rw-r--r-- | lldb/source/Host/common/Terminal.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp index 811d712ea0d..ca46eb0f744 100644 --- a/lldb/source/Host/common/Terminal.cpp +++ b/lldb/source/Host/common/Terminal.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/Terminal.h" +#include "llvm/ADT/STLExtras.h" #include <fcntl.h> #include <signal.h> @@ -274,7 +275,7 @@ TerminalStateSwitcher::~TerminalStateSwitcher () uint32_t TerminalStateSwitcher::GetNumberOfStates() const { - return sizeof(m_ttystates)/sizeof(TerminalState); + return llvm::array_lengthof(m_ttystates); } //------------------------------------------------------------------ |