| 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 | |
| 15 | using namespace lldb; |
| 16 | using namespace lldb_private; |
| 17 | |
| 18 | SBStatisticsOptions::SBStatisticsOptions() |
| 19 | : m_opaque_up(new StatisticsOptions()) { |
| 20 | LLDB_INSTRUMENT_VA(this); |
| 21 | } |
| 22 | |
| 23 | SBStatisticsOptions::SBStatisticsOptions(const SBStatisticsOptions &rhs) { |
| 24 | LLDB_INSTRUMENT_VA(this, rhs); |
| 25 | |
| 26 | m_opaque_up = clone(src: rhs.m_opaque_up); |
| 27 | } |
| 28 | |
| 29 | SBStatisticsOptions::~SBStatisticsOptions() = default; |
| 30 | |
| 31 | const SBStatisticsOptions & |
| 32 | SBStatisticsOptions::operator=(const SBStatisticsOptions &rhs) { |
| 33 | LLDB_INSTRUMENT_VA(this, rhs); |
| 34 | |
| 35 | if (this != &rhs) |
| 36 | m_opaque_up = clone(src: rhs.m_opaque_up); |
| 37 | return *this; |
| 38 | } |
| 39 | |
| 40 | void SBStatisticsOptions::SetSummaryOnly(bool b) { |
| 41 | m_opaque_up->SetSummaryOnly(b); |
| 42 | } |
| 43 | |
| 44 | bool SBStatisticsOptions::GetSummaryOnly() { |
| 45 | return m_opaque_up->GetSummaryOnly(); |
| 46 | } |
| 47 | |
| 48 | void SBStatisticsOptions::SetIncludeTargets(bool b) { |
| 49 | m_opaque_up->SetIncludeTargets(b); |
| 50 | } |
| 51 | |
| 52 | bool SBStatisticsOptions::GetIncludeTargets() const { |
| 53 | return m_opaque_up->GetIncludeTargets(); |
| 54 | } |
| 55 | |
| 56 | void SBStatisticsOptions::SetIncludeModules(bool b) { |
| 57 | m_opaque_up->SetIncludeModules(b); |
| 58 | } |
| 59 | |
| 60 | bool SBStatisticsOptions::GetIncludeModules() const { |
| 61 | return m_opaque_up->GetIncludeModules(); |
| 62 | } |
| 63 | |
| 64 | void SBStatisticsOptions::SetIncludeTranscript(bool b) { |
| 65 | m_opaque_up->SetIncludeTranscript(b); |
| 66 | } |
| 67 | |
| 68 | bool SBStatisticsOptions::GetIncludeTranscript() const { |
| 69 | return m_opaque_up->GetIncludeTranscript(); |
| 70 | } |
| 71 | |
| 72 | void SBStatisticsOptions::SetReportAllAvailableDebugInfo(bool b) { |
| 73 | m_opaque_up->SetLoadAllDebugInfo(b); |
| 74 | } |
| 75 | |
| 76 | bool SBStatisticsOptions::GetReportAllAvailableDebugInfo() { |
| 77 | return m_opaque_up->GetLoadAllDebugInfo(); |
| 78 | } |
| 79 | |
| 80 | const lldb_private::StatisticsOptions &SBStatisticsOptions::ref() const { |
| 81 | return *m_opaque_up; |
| 82 | } |
| 83 |
