[PATCH] D78672: [Debuginfo] Remove redundand variable from getAttributeValue()
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 14:41:49 PDT 2020
avl created this revision.
avl added reviewers: JDevlieghere, clayborg, dblaikie.
avl added projects: LLVM, debug-info.
Herald added subscribers: hiraditya, aprantl.
AttrIndex could be removed from DWARFAbbreviationDeclaration::getAttributeValue.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78672
Files:
llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
Index: llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
@@ -159,9 +159,8 @@
// Add the byte size of ULEB that for the abbrev Code so we can start
// skipping the attribute data.
uint64_t Offset = DIEOffset + CodeByteSize;
- uint32_t AttrIndex = 0;
for (const auto &Spec : AttributeSpecs) {
- if (*MatchAttrIndex == AttrIndex) {
+ if (Spec.Attr == Attr) {
// We have arrived at the attribute to extract, extract if from Offset.
if (Spec.isImplicitConst())
return DWARFFormValue::createFromSValue(Spec.Form,
@@ -177,7 +176,6 @@
else
DWARFFormValue::skipValue(Spec.Form, DebugInfoData, &Offset,
U.getFormParams());
- ++AttrIndex;
}
return None;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78672.259397.patch
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200422/ad2c1503/attachment.bin>
More information about the llvm-commits
mailing list