[PATCH] D79123: [Debuginfo][NFC] findRecursively: Replace std::vector by SmallVector
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 14:00:50 PDT 2020
avl created this revision.
avl added reviewers: clayborg, dblaikie, JDevlieghere.
avl added projects: LLVM, debug-info.
Herald added a subscriber: hiraditya.
Change std::vector to SmallVector to prevent re-allocations and to
have small pre-allocated storage.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79123
Files:
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
Index: llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -356,7 +356,7 @@
Optional<DWARFFormValue>
DWARFDie::findRecursively(ArrayRef<dwarf::Attribute> Attrs) const {
- std::vector<DWARFDie> Worklist;
+ SmallVector<DWARFDie, 3> Worklist;
Worklist.push_back(*this);
// Keep track if DIEs already seen to prevent infinite recursion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79123.261016.patch
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200429/9ae84985/attachment.bin>
More information about the llvm-commits
mailing list