LLDB mainline
SBProgress.cpp
Go to the documentation of this file.
1//===-- SBProgress.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
10#include "lldb/Core/Progress.h"
12
13using namespace lldb;
14
15SBProgress::SBProgress(const char *title, const char *details,
16 SBDebugger &debugger) {
17 LLDB_INSTRUMENT_VA(this, title, details, debugger);
18
19 m_opaque_up = std::make_unique<lldb_private::Progress>(
20 title, details, /*total=*/std::nullopt, debugger.get(),
21 /*minimum_report_time=*/std::nullopt,
23}
24
25SBProgress::SBProgress(const char *title, const char *details,
26 uint64_t total_units, SBDebugger &debugger) {
27 LLDB_INSTRUMENT_VA(this, title, details, total_units, debugger);
28
29 m_opaque_up = std::make_unique<lldb_private::Progress>(
30 title, details, total_units, debugger.get(),
31 /*minimum_report_time=*/std::nullopt,
33}
34
35SBProgress::~SBProgress() = default;
36
37void SBProgress::Increment(uint64_t amount, const char *description) {
38 LLDB_INSTRUMENT_VA(amount, description);
39
40 m_opaque_up->Increment(amount, description);
41}
42
#define LLDB_INSTRUMENT_VA(...)
lldb_private::Debugger * get() const
lldb_private::Progress & ref() const
Definition: SBProgress.cpp:43
SBProgress(const char *title, const char *details, SBDebugger &debugger)
Construct a progress object with a title, details and a given debugger.
Definition: SBProgress.cpp:15
void Increment(uint64_t amount, const char *description=nullptr)
Definition: SBProgress.cpp:37
std::unique_ptr< lldb_private::Progress > m_opaque_up
Definition: SBProgress.h:62
A Progress indicator helper class.
Definition: Progress.h:60
Definition: SBAddress.h:15