[llvm] r349985 - DebugInfo: Remove extra attribute lookup
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 18:24:13 PST 2018
Author: dblaikie
Date: Fri Dec 21 18:24:13 2018
New Revision: 349985
URL: http://llvm.org/viewvc/llvm-project?rev=349985&view=rev
Log:
DebugInfo: Remove extra attribute lookup
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp?rev=349985&r1=349984&r2=349985&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp Fri Dec 21 18:24:13 2018
@@ -353,10 +353,9 @@ static void dumpAttribute(raw_ostream &O
const DWARFObject &Obj = Die.getDwarfUnit()->getContext().getDWARFObj();
// For DW_FORM_rnglistx we need to dump the offset separately, since
// we have only dumped the index so far.
- Optional<DWARFFormValue> Value = Die.find(DW_AT_ranges);
- if (Value && Value->getForm() == DW_FORM_rnglistx)
+ if (formValue.getForm() == DW_FORM_rnglistx)
if (auto RangeListOffset =
- U->getRnglistOffset(*Value->getAsSectionOffset())) {
+ U->getRnglistOffset(*formValue.getAsSectionOffset())) {
DWARFFormValue FV(dwarf::DW_FORM_sec_offset);
FV.setUValue(*RangeListOffset);
FV.dump(OS, DumpOpts);
More information about the llvm-commits
mailing list