diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-10 00:48:33 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-10 00:48:33 +0000 |
commit | 7c575b3b3ae4aea7403f1bc78a6632cec58b8879 (patch) | |
tree | 262f8ed7da9e1710ab2dbdf60f01a6d00383d121 /lldb/source/Interpreter/OptionGroupArchitecture.cpp | |
parent | 964d758d17bad31b5b3b713827e613c444476d91 (diff) | |
download | bcm5719-llvm-7c575b3b3ae4aea7403f1bc78a6632cec58b8879.tar.gz bcm5719-llvm-7c575b3b3ae4aea7403f1bc78a6632cec58b8879.zip |
Refactoring: replace a bunch of static array size computation or hardcoded constant
with a template function 'arraysize(static_array)', defined in Utils.h.
llvm-svn: 139444
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupArchitecture.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionGroupArchitecture.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/OptionGroupArchitecture.cpp b/lldb/source/Interpreter/OptionGroupArchitecture.cpp index 9446f2e73d5..377bac0c61a 100644 --- a/lldb/source/Interpreter/OptionGroupArchitecture.cpp +++ b/lldb/source/Interpreter/OptionGroupArchitecture.cpp @@ -13,6 +13,7 @@ // C++ Includes // Other libraries and framework includes // Project includes +#include "lldb/Utility/Utils.h" using namespace lldb; using namespace lldb_private; @@ -29,15 +30,13 @@ OptionGroupArchitecture::~OptionGroupArchitecture () static OptionDefinition g_option_table[] = { -{ LLDB_OPT_SET_1 , false, "arch" , 'a', required_argument, NULL, 0, eArgTypeArchitecture , "Specify the architecture for the target."}, + { LLDB_OPT_SET_1 , false, "arch" , 'a', required_argument, NULL, 0, eArgTypeArchitecture , "Specify the architecture for the target."}, }; -const uint32_t k_num_file_options = sizeof(g_option_table)/sizeof(OptionDefinition); - uint32_t OptionGroupArchitecture::GetNumDefinitions () { - return k_num_file_options; + return arraysize(g_option_table); } const OptionDefinition * |