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/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.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/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index c3c2c673872..f871f255a57 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -17,6 +17,7 @@ #include <sstream> // Other libraries and framework includes +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Triple.h" #include "lldb/Interpreter/Args.h" #include "lldb/Core/ConnectionFileDescriptor.h" @@ -2660,8 +2661,8 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets) { static uint32_t g_send_sizes[] = { 0, 64, 128, 512, 1024 }; static uint32_t g_recv_sizes[] = { 0, 64, 128, 512, 1024 }; //, 4*1024, 8*1024, 16*1024, 32*1024, 48*1024, 64*1024, 96*1024, 128*1024 }; - const size_t k_num_send_sizes = sizeof(g_send_sizes)/sizeof(uint32_t); - const size_t k_num_recv_sizes = sizeof(g_recv_sizes)/sizeof(uint32_t); + const size_t k_num_send_sizes = llvm::array_lengthof(g_send_sizes); + const size_t k_num_recv_sizes = llvm::array_lengthof(g_recv_sizes); const uint64_t k_recv_amount = 4*1024*1024; // Receive 4MB for (uint32_t send_idx = 0; send_idx < k_num_send_sizes; ++send_idx) { |