[Lldb-commits] [lldb] a4d45fe - [lldb][DWARF] Change GetAttributes parameter from SmallVector to SmallVectorImpl

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 17 06:58:24 PST 2025


Author: Michael Buch
Date: 2025-01-17T14:56:41Z
New Revision: a4d45fe8462bf7042bac2edfb87e3e41e4156ba4

URL: https://github.com/llvm/llvm-project/commit/a4d45fe8462bf7042bac2edfb87e3e41e4156ba4
DIFF: https://github.com/llvm/llvm-project/commit/a4d45fe8462bf7042bac2edfb87e3e41e4156ba4.diff

LOG: [lldb][DWARF] Change GetAttributes parameter from SmallVector to SmallVectorImpl

Fixes the lldb-arm-ubuntu buildbot failure:
```
../llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:374:26:
error: non-const lvalue reference to type 'SmallVector<[...], (default)
CalculateSmallVectorDefaultInlinedElements<T>::value aka 6>' cannot bind
to a value of unrelated type 'SmallVector<[...], 3>'
  374 |     if (!::GetAttributes(worklist, seen, attributes)) {
      |                          ^~~~~~~~
../llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:288:56:
note: passing argument to parameter 'worklist' here
  288 | static bool GetAttributes(llvm::SmallVector<DWARFDIE> &worklist,
      |                                                        ^
1 error generated.
```

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index c2edc52aa964f1..aafdd2ec683092 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -285,7 +285,7 @@ bool DWARFDebugInfoEntry::GetDIENamesAndRanges(
 /// Adds all attributes of the DIE at the top of the \c worklist to the
 /// \c attributes list. Specifcations and abstract origins are added
 /// to the \c worklist if the referenced DIE has not been seen before.
-static bool GetAttributes(llvm::SmallVector<DWARFDIE> &worklist,
+static bool GetAttributes(llvm::SmallVectorImpl<DWARFDIE> &worklist,
                           llvm::SmallSet<DWARFDebugInfoEntry const *, 3> &seen,
                           DWARFAttributes &attributes) {
   assert(!worklist.empty() && "Need at least one DIE to visit.");


        


More information about the lldb-commits mailing list