[PATCH] D134357: [NFC] Remove unused set construction from DILocation::getMergedLocation
Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 21 08:09:21 PDT 2022
jmmartinez updated this revision to Diff 461899.
jmmartinez added a comment.
Removed useless Result local variable too
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134357/new/
https://reviews.llvm.org/D134357
Files:
llvm/lib/IR/DebugInfoMetadata.cpp
Index: llvm/lib/IR/DebugInfoMetadata.cpp
===================================================================
--- llvm/lib/IR/DebugInfoMetadata.cpp
+++ llvm/lib/IR/DebugInfoMetadata.cpp
@@ -106,9 +106,6 @@
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();
@@ -120,7 +117,6 @@
L = L->getInlinedAt();
}
}
- const DILocation *Result = LocB;
S = LocB->getScope();
L = LocB->getInlinedAt();
while (S) {
@@ -137,7 +133,7 @@
// 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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134357.461899.patch
Type: text/x-patch
Size: 1048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220921/7ebf2e2d/attachment.bin>
More information about the llvm-commits
mailing list