[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 25 10:41:08 PDT 2023


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 8efd6799f006000a5e3aacbb403f262db37290b6 c8d9a1f7387e3e4944d92ccb33699b6a9d0dcf89 -- lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
index f94491b29bdb..d5ff2f0da9ac 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -132,7 +132,7 @@ void DebugNamesDWARFIndex::GetGlobalVariables(
   for (const DebugNames::NameIndex &ni: *m_debug_names_up) {
     // Check if this name index contains an entry for the given CU.
     bool has_match_cu = false;
-    for (uint32_t i = 0;i < ni.getCUCount();++i) {
+    for (uint32_t i = 0; i < ni.getCUCount(); ++i) {
       if (ni.getCUOffset(i) == cu_offset) {
         has_match_cu = true;
         break;

``````````

</details>


https://github.com/llvm/llvm-project/pull/70231


More information about the lldb-commits mailing list