summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/Terminal.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-27 05:17:41 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-27 05:17:41 +0000
commit28606954bfe08ab4fb146cc85f2d4c0aff5cf1c2 (patch)
tree2c3f2fd83144860783b0f5cc3b82c0f3a3d3912f /lldb/source/Host/common/Terminal.cpp
parent040c0da57830c5bb0a99be4eb1c2a97d38c78be0 (diff)
downloadbcm5719-llvm-28606954bfe08ab4fb146cc85f2d4c0aff5cf1c2.tar.gz
bcm5719-llvm-28606954bfe08ab4fb146cc85f2d4c0aff5cf1c2.zip
lldb: remove adhoc implementation of array_sizeof
Replace adhoc inline implementation of llvm::array_lengthof in favour of the implementation in LLVM. This is simply a cleanup change, no functional change intended. llvm-svn: 211868
Diffstat (limited to 'lldb/source/Host/common/Terminal.cpp')
-rw-r--r--lldb/source/Host/common/Terminal.cpp3
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);
}
//------------------------------------------------------------------
OpenPOWER on IntegriCloud