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/Core/ArchSpec.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/Core/ArchSpec.cpp')
-rw-r--r-- | lldb/source/Core/ArchSpec.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index 82764699b8c..f9db53b92a3 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -14,6 +14,7 @@ #include <string> +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/COFF.h" #include "llvm/Support/ELF.h" #include "llvm/Support/Host.h" @@ -227,7 +228,7 @@ static const ArchDefinitionEntry g_macho_arch_entries[] = }; static const ArchDefinition g_macho_arch_def = { eArchTypeMachO, - sizeof(g_macho_arch_entries)/sizeof(g_macho_arch_entries[0]), + llvm::array_lengthof(g_macho_arch_entries), g_macho_arch_entries, "mach-o" }; @@ -253,7 +254,7 @@ static const ArchDefinitionEntry g_elf_arch_entries[] = static const ArchDefinition g_elf_arch_def = { eArchTypeELF, - sizeof(g_elf_arch_entries)/sizeof(g_elf_arch_entries[0]), + llvm::array_lengthof(g_elf_arch_entries), g_elf_arch_entries, "elf", }; @@ -271,7 +272,7 @@ static const ArchDefinitionEntry g_coff_arch_entries[] = static const ArchDefinition g_coff_arch_def = { eArchTypeCOFF, - sizeof(g_coff_arch_entries)/sizeof(g_coff_arch_entries[0]), + llvm::array_lengthof(g_coff_arch_entries), g_coff_arch_entries, "pe-coff", }; @@ -284,8 +285,7 @@ static const ArchDefinition *g_arch_definitions[] = { &g_coff_arch_def }; -static const size_t k_num_arch_definitions = - sizeof(g_arch_definitions) / sizeof(g_arch_definitions[0]); +static const size_t k_num_arch_definitions = llvm::array_lengthof(g_arch_definitions); //===----------------------------------------------------------------------===// // Static helper functions. |