[lldb][dwarf] Compute fully qualified names on simplified template names with DWARFT...
[llvm-project.git] / lldb / source / Interpreter / OptionGroupUUID.cpp
blob7a0efbab0398bfe0bded094a7ef2df6b88b02abe
1 //===-- OptionGroupUUID.cpp -----------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Interpreter/OptionGroupUUID.h"
11 #include "lldb/Host/OptionParser.h"
13 using namespace lldb;
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) {
28 Status error;
29 const int short_option = g_option_table[option_idx].short_option;
31 switch (short_option) {
32 case 'u':
33 error = m_uuid.SetValueFromString(option_arg);
34 if (error.Success())
35 m_uuid.SetOptionWasSet();
36 break;
38 default:
39 llvm_unreachable("Unimplemented option");
42 return error;
45 void OptionGroupUUID::OptionParsingStarting(
46 ExecutionContext *execution_context) {
47 m_uuid.Clear();