Coverage Report

Created: 2022-07-16 07:03

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h
Line
Count
Source (jump to first uncovered line)
1
//===-- OptionGroupArchitecture.h -------------------------------*- C++ -*-===//
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
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_INTERPRETER_OPTIONGROUPARCHITECTURE_H
10
#define LLDB_INTERPRETER_OPTIONGROUPARCHITECTURE_H
11
12
#include "lldb/Interpreter/Options.h"
13
#include "lldb/Utility/ArchSpec.h"
14
15
namespace lldb_private {
16
17
// OptionGroupArchitecture
18
19
class OptionGroupArchitecture : public OptionGroup {
20
public:
21
6.24k
  OptionGroupArchitecture() = default;
22
23
6.23k
  ~OptionGroupArchitecture() override = default;
24
25
  llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
26
27
  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
28
                        ExecutionContext *execution_context) override;
29
30
  void OptionParsingStarting(ExecutionContext *execution_context) override;
31
32
  bool GetArchitecture(Platform *platform, ArchSpec &arch);
33
34
0
  bool ArchitectureWasSpecified() const { return !m_arch_str.empty(); }
35
36
1.16k
  llvm::StringRef GetArchitectureName() const { return m_arch_str; }
37
38
protected:
39
  std::string m_arch_str; // Save the arch triple in case a platform is
40
                          // specified after the architecture
41
};
42
43
} // namespace lldb_private
44
45
#endif // LLDB_INTERPRETER_OPTIONGROUPARCHITECTURE_H