[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 9 18:40:34 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3a8a9267c5ee75e0d1e2f00662d2b913e1dba8d1 44a3cdca21bc9c2aa24eeaf5d82c8b8af382bfa7 -- lldb/include/lldb/Core/DebuggerEvents.h lldb/include/lldb/Core/Progress.h lldb/source/Core/Progress.cpp lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/source/Plugins/SymbolLocator/Default/SymbolLocatorDefault.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/include/lldb/Core/DebuggerEvents.h b/lldb/include/lldb/Core/DebuggerEvents.h
index 1fadb96a4b..4a27766e94 100644
--- a/lldb/include/lldb/Core/DebuggerEvents.h
+++ b/lldb/include/lldb/Core/DebuggerEvents.h
@@ -20,8 +20,9 @@ class Stream;
class ProgressEventData : public EventData {
public:
- ProgressEventData(uint64_t progress_id, std::string title, std::string details,
- uint64_t completed, uint64_t total, bool debugger_specific)
+ ProgressEventData(uint64_t progress_id, std::string title,
+ std::string details, uint64_t completed, uint64_t total,
+ bool debugger_specific)
: m_title(std::move(title)), m_details(std::move(details)),
m_id(progress_id), m_completed(completed), m_total(total),
m_debugger_specific(debugger_specific) {}
diff --git a/lldb/include/lldb/Core/Progress.h b/lldb/include/lldb/Core/Progress.h
index 1ea6df01a4..fd5b8463cc 100644
--- a/lldb/include/lldb/Core/Progress.h
+++ b/lldb/include/lldb/Core/Progress.h
@@ -69,7 +69,8 @@ public:
///
/// @param [in] debugger An optional debugger pointer to specify that this
/// progress is to be reported only to specific debuggers.
- Progress(std::string title, std::string details = {}, uint64_t total = UINT64_MAX,
+ Progress(std::string title, std::string details = {},
+ uint64_t total = UINT64_MAX,
lldb_private::Debugger *debugger = nullptr);
/// Destroy the progress object.
diff --git a/lldb/source/Core/Progress.cpp b/lldb/source/Core/Progress.cpp
index 8c99b56137..6d27763f85 100644
--- a/lldb/source/Core/Progress.cpp
+++ b/lldb/source/Core/Progress.cpp
@@ -18,7 +18,8 @@ std::atomic<uint64_t> Progress::g_id(0);
Progress::Progress(std::string title, std::string details, uint64_t total,
lldb_private::Debugger *debugger)
- : m_title(title), m_details(details), m_id(++g_id), m_completed(0), m_total(total) {
+ : m_title(title), m_details(details), m_id(++g_id), m_completed(0),
+ m_total(total) {
assert(total > 0);
if (debugger)
m_debugger_id = debugger->GetID();
@@ -54,7 +55,7 @@ void Progress::ReportProgress(std::string update) {
// Make sure we only send one notification that indicates the progress is
// complete.
m_complete = m_completed == m_total;
- Debugger::ReportProgress(m_id, m_title, m_details, m_completed,
- m_total, m_debugger_id);
+ Debugger::ReportProgress(m_id, m_title, m_details, m_completed, m_total,
+ m_debugger_id);
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index 5255590886..92275600f9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -75,7 +75,8 @@ void ManualDWARFIndex::Index() {
// Include 2 passes per unit to index for extracting DIEs from the unit and
// indexing the unit, and then 8 extra entries for finalizing each index set.
const uint64_t total_progress = units_to_index.size() * 2 + 8;
- Progress progress("Manually indexing DWARF", module_desc.GetData(), total_progress);
+ Progress progress("Manually indexing DWARF", module_desc.GetData(),
+ total_progress);
std::vector<IndexSet> sets(units_to_index.size());
diff --git a/lldb/source/Plugins/SymbolLocator/Default/SymbolLocatorDefault.cpp b/lldb/source/Plugins/SymbolLocator/Default/SymbolLocatorDefault.cpp
index 52ae7adb8d..6f0126b16c 100644
--- a/lldb/source/Plugins/SymbolLocator/Default/SymbolLocatorDefault.cpp
+++ b/lldb/source/Plugins/SymbolLocator/Default/SymbolLocatorDefault.cpp
@@ -98,7 +98,9 @@ std::optional<FileSpec> SymbolLocatorDefault::LocateExecutableSymbolFile(
FileSystem::Instance().Exists(symbol_file_spec))
return symbol_file_spec;
- Progress progress("Locating external symbol file", module_spec.GetFileSpec().GetFilename().AsCString("<Unknown>"));
+ Progress progress(
+ "Locating external symbol file",
+ module_spec.GetFileSpec().GetFilename().AsCString("<Unknown>"));
FileSpecList debug_file_search_paths = default_search_paths;
``````````
</details>
https://github.com/llvm/llvm-project/pull/77547
More information about the lldb-commits
mailing list