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
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 28fd322..bfce324 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -34,6 +34,7 @@
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
using namespace lldb;
@@ -71,7 +72,7 @@
uint32_t
CommandObjectExpression::CommandOptions::GetNumDefinitions ()
{
- return sizeof(g_option_table)/sizeof(OptionDefinition);
+ return llvm::array_lengthof(g_option_table);
}
Error