[Lldb-commits] [lldb] 98efa3d - [lldb] Change the CommandArgumentData ctor (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 21 09:50:37 PDT 2020
Author: Jonas Devlieghere
Date: 2020-07-21T09:50:30-07:00
New Revision: 98efa3d57f0a38c9cd5433640a9abe6e7d9b7513
URL: https://github.com/llvm/llvm-project/commit/98efa3d57f0a38c9cd5433640a9abe6e7d9b7513
DIFF: https://github.com/llvm/llvm-project/commit/98efa3d57f0a38c9cd5433640a9abe6e7d9b7513.diff
LOG: [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.
Added:
Modified:
lldb/include/lldb/Interpreter/CommandObject.h
Removed:
################################################################################
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 @@ class CommandObject {
{
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>
More information about the lldb-commits
mailing list