1//===-- SBStatisticsOptions.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//===----------------------------------------------------------------------===//
8
9#include "lldb/API/SBStatisticsOptions.h"
10#include "lldb/Target/Statistics.h"
11#include "lldb/Utility/Instrumentation.h"
12
13#include "Utils.h"
14
15using namespace lldb;
16using namespace lldb_private;
17
18SBStatisticsOptions::SBStatisticsOptions()
19 : m_opaque_up(new StatisticsOptions()) {
20 LLDB_INSTRUMENT_VA(this);
21 m_opaque_up->summary_only = false;
22}
23
24SBStatisticsOptions::SBStatisticsOptions(const SBStatisticsOptions &rhs) {
25 LLDB_INSTRUMENT_VA(this, rhs);
26
27 m_opaque_up = clone(src: rhs.m_opaque_up);
28}
29
30SBStatisticsOptions::~SBStatisticsOptions() = default;
31
32const SBStatisticsOptions &
33SBStatisticsOptions::operator=(const SBStatisticsOptions &rhs) {
34 LLDB_INSTRUMENT_VA(this, rhs);
35
36 if (this != &rhs)
37 m_opaque_up = clone(src: rhs.m_opaque_up);
38 return *this;
39}
40
41void SBStatisticsOptions::SetSummaryOnly(bool b) {
42 m_opaque_up->summary_only = b;
43}
44
45bool SBStatisticsOptions::GetSummaryOnly() { return m_opaque_up->summary_only; }
46
47void SBStatisticsOptions::SetReportAllAvailableDebugInfo(bool b) {
48 m_opaque_up->load_all_debug_info = b;
49}
50
51bool SBStatisticsOptions::GetReportAllAvailableDebugInfo() {
52 return m_opaque_up->load_all_debug_info;
53}
54
55const lldb_private::StatisticsOptions &SBStatisticsOptions::ref() const {
56 return *m_opaque_up;
57}
58

source code of lldb/source/API/SBStatisticsOptions.cpp