[llvm] r300753 - Code style change as suggested in https://reviews.llvm.org/D32177 (NFC)
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 13:52:21 PDT 2017
Author: dehao
Date: Wed Apr 19 15:52:21 2017
New Revision: 300753
URL: http://llvm.org/viewvc/llvm-project?rev=300753&view=rev
Log:
Code style change as suggested in https://reviews.llvm.org/D32177 (NFC)
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFUnit.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFUnit.cpp?rev=300753&r1=300752&r2=300753&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFUnit.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFUnit.cpp Wed Apr 19 15:52:21 2017
@@ -387,24 +387,19 @@ DWARFDie DWARFUnit::getSubroutineForAddr
void
DWARFUnit::getInlinedChainForAddress(uint64_t Address,
SmallVectorImpl<DWARFDie> &InlinedChain) {
- // First, find the subroutine that contains the given address (the leaf
- // of inlined chain).
- DWARFDie SubroutineDIE;
+ assert(InlinedChain.empty());
// Try to look for subprogram DIEs in the DWO file.
parseDWO();
- if (DWO)
- SubroutineDIE = DWO->getUnit()->getSubroutineForAddress(Address);
- else
- SubroutineDIE = getSubroutineForAddress(Address);
+ // First, find the subroutine that contains the given address (the leaf
+ // of inlined chain).
+ DWARFDie SubroutineDIE =
+ (DWO ? DWO->getUnit() : this)->getSubroutineForAddress(Address);
- if (SubroutineDIE) {
- while (SubroutineDIE) {
- if (SubroutineDIE.isSubroutineDIE())
- InlinedChain.push_back(SubroutineDIE);
- SubroutineDIE = SubroutineDIE.getParent();
- }
- } else
- InlinedChain.clear();
+ while (SubroutineDIE) {
+ if (SubroutineDIE.isSubroutineDIE())
+ InlinedChain.push_back(SubroutineDIE);
+ SubroutineDIE = SubroutineDIE.getParent();
+ }
}
const DWARFUnitIndex &llvm::getDWARFUnitIndex(DWARFContext &Context,
More information about the llvm-commits
mailing list