summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-07-21 09:49:12 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2020-07-21 09:50:30 -0700
commit98efa3d57f0a38c9cd5433640a9abe6e7d9b7513 (patch)
treed2d81d23c51368e1f8f5277744d811b3570df685
parent5b0de5756ccc7a540926e4eeaa3b398539d88cd8 (diff)
downloadllvm-98efa3d57f0a38c9cd5433640a9abe6e7d9b7513.tar.gz
[lldb] Change the CommandArgumentData ctor (NFC)
By using default arguments the caller can specify a subset without the need for overloads. This is particularly useful in combination with emplace_back as these objects are generally stored in a vector.
-rw-r--r--lldb/include/lldb/Interpreter/CommandObject.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h
index cc4d40b23c31..b927c7eaf262 100644
--- a/lldb/include/lldb/Interpreter/CommandObject.h
+++ b/lldb/include/lldb/Interpreter/CommandObject.h
@@ -90,14 +90,13 @@ public:
{
lldb::CommandArgumentType arg_type;
ArgumentRepetitionType arg_repetition;
- uint32_t arg_opt_set_association; // This arg might be associated only with
- // some particular option set(s).
- CommandArgumentData()
- : arg_type(lldb::eArgTypeNone), arg_repetition(eArgRepeatPlain),
- arg_opt_set_association(LLDB_OPT_SET_ALL) // By default, the arg
- // associates to all option
- // sets.
- {}
+ /// This arg might be associated only with some particular option set(s). By
+ /// default the arg associates to all option sets.
+ uint32_t arg_opt_set_association;
+
+ CommandArgumentData(lldb::CommandArgumentType type = lldb::eArgTypeNone,
+ ArgumentRepetitionType repetition = eArgRepeatPlain,
+ uint32_t opt_set = LLDB_OPT_SET_ALL) {}
};
typedef std::vector<CommandArgumentData>