Skip to content

Commit

Permalink
[NFC] Remove unused set construction from DILocation::getMergedLocation
Browse files Browse the repository at this point in the history
Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D134357

Change-Id: I7e1700e3179d405e672615d3432024cec29016ba
  • Loading branch information
jmmartinez authored and zhang2amd committed Nov 18, 2022
1 parent 5e60aba commit 4fb628b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions llvm/lib/IR/DebugInfoMetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ const DILocation *DILocation::getMergedLocation(const DILocation *LocA,
if (LocA == LocB)
return LocA;

SmallPtrSet<DILocation *, 5> InlinedLocationsA;
for (DILocation *L = LocA->getInlinedAt(); L; L = L->getInlinedAt())
InlinedLocationsA.insert(L);
SmallSet<std::pair<DIScope *, DILocation *>, 5> Locations;
DIScope *S = LocA->getScope();
DILocation *L = LocA->getInlinedAt();
Expand All @@ -122,7 +119,6 @@ const DILocation *DILocation::getMergedLocation(const DILocation *LocA,
L = L->getInlinedAt();
}
}
const DILocation *Result = LocB;
S = LocB->getScope();
L = LocB->getInlinedAt();
while (S) {
Expand All @@ -139,7 +135,7 @@ const DILocation *DILocation::getMergedLocation(const DILocation *LocA,
// but on the other hand, it's a "line 0" location.
if (!S || !isa<DILocalScope>(S))
S = LocA->getScope();
return DILocation::get(Result->getContext(), 0, 0, S, L);
return DILocation::get(LocA->getContext(), 0, 0, S, L);
}

Optional<unsigned> DILocation::encodeDiscriminator(unsigned BD, unsigned DF,
Expand Down

0 comments on commit 4fb628b

Please sign in to comment.