1 //===-- OptionGroupUUID.cpp -----------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Interpreter/OptionGroupUUID.h"
11 #include "lldb/Host/OptionParser.h"
14 using namespace lldb_private
;
16 static constexpr OptionDefinition g_option_table
[] = {
17 {LLDB_OPT_SET_1
, false, "uuid", 'u', OptionParser::eRequiredArgument
,
18 nullptr, {}, 0, eArgTypeModuleUUID
, "A module UUID value."},
21 llvm::ArrayRef
<OptionDefinition
> OptionGroupUUID::GetDefinitions() {
22 return llvm::ArrayRef(g_option_table
);
25 Status
OptionGroupUUID::SetOptionValue(uint32_t option_idx
,
26 llvm::StringRef option_arg
,
27 ExecutionContext
*execution_context
) {
29 const int short_option
= g_option_table
[option_idx
].short_option
;
31 switch (short_option
) {
33 error
= m_uuid
.SetValueFromString(option_arg
);
35 m_uuid
.SetOptionWasSet();
39 llvm_unreachable("Unimplemented option");
45 void OptionGroupUUID::OptionParsingStarting(
46 ExecutionContext
*execution_context
) {