[Lldb-commits] [PATCH] D87441: Speedup collecting DWARF attribute values
Dmitry Antipov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 14 02:30:08 PDT 2020
dmantipov updated this revision to Diff 291519.
dmantipov added a comment.
Drop prefixes and tweak the style to match clang-format requirements.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87441/new/
https://reviews.llvm.org/D87441
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
@@ -52,8 +52,10 @@
DWARFAttributes();
~DWARFAttributes();
- void Append(const DWARFUnit *cu, dw_offset_t attr_die_offset,
- dw_attr_t attr, dw_form_t form);
+ void Append(const DWARFUnit *cu, dw_offset_t attr_die_offset, dw_attr_t attr,
+ dw_form_t form) {
+ m_infos.emplace_back(cu, attr_die_offset, attr, form);
+ }
const DWARFUnit *CompileUnitAtIndex(uint32_t i) const {
return m_infos[i].cu;
}
@@ -77,6 +79,11 @@
// case we have DW_FORM_ref_addr values
dw_offset_t die_offset;
DWARFAttribute attr;
+
+ AttributeValue(const DWARFUnit *cu, dw_offset_t die_offset, dw_attr_t attr,
+ dw_form_t form)
+ : cu(cu), die_offset(die_offset),
+ attr(attr, form, DWARFFormValue::ValueType()) {}
};
typedef llvm::SmallVector<AttributeValue, 8> collection;
collection m_infos;
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
@@ -25,13 +25,6 @@
return UINT32_MAX;
}
-void DWARFAttributes::Append(const DWARFUnit *cu, dw_offset_t attr_die_offset,
- dw_attr_t attr, dw_form_t form) {
- AttributeValue attr_value = {
- cu, attr_die_offset, {attr, form, DWARFFormValue::ValueType()}};
- m_infos.push_back(attr_value);
-}
-
bool DWARFAttributes::ExtractFormValueAtIndex(
uint32_t i, DWARFFormValue &form_value) const {
const DWARFUnit *cu = CompileUnitAtIndex(i);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87441.291519.patch
Type: text/x-patch
Size: 1882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200914/9c44534e/attachment.bin>
More information about the lldb-commits
mailing list