diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-27 05:17:41 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-27 05:17:41 +0000 |
commit | 28606954bfe08ab4fb146cc85f2d4c0aff5cf1c2 (patch) | |
tree | 2c3f2fd83144860783b0f5cc3b82c0f3a3d3912f /lldb/tools/debugserver/source/DNB.cpp | |
parent | 040c0da57830c5bb0a99be4eb1c2a97d38c78be0 (diff) | |
download | bcm5719-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/tools/debugserver/source/DNB.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index 8380752f54e..cbbf82fc051 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -47,6 +47,7 @@ #include "DNBTimer.h" #include "CFBundle.h" +#include "llvm/ADT/STLExtras.h" typedef std::shared_ptr<MachProcess> MachProcessSP; typedef std::map<nub_process_t, MachProcessSP> ProcessMap; @@ -542,7 +543,7 @@ GetAllInfos (std::vector<struct kinfo_proc>& proc_infos) { size_t size = 0; int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL }; - u_int namelen = sizeof(name)/sizeof(int); + u_int namelen = llvm::array_lengthof(name); int err; // Try to find out how many processes are around so we can |