Code style change as suggested in https://reviews.llvm.org/D32177 (NFC)

llvm-svn: 300753
This commit is contained in:
Dehao Chen 2017-04-19 20:52:21 +00:00
parent 70ad2751d5
commit db569bae55
1 changed files with 10 additions and 15 deletions

View File

@ -387,24 +387,19 @@ DWARFDie DWARFUnit::getSubroutineForAddress(uint64_t Address) {
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,