Skip to content

Commit

Permalink
[Bitcode] Avoid repeated hash lookups (NFC) (#107708)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata authored Sep 7, 2024
1 parent 51d3829 commit 6f6100f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Bitcode/Reader/MetadataLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,8 @@ class MetadataLoader::MetadataLoaderImpl {
DenseSet<DILocalScope *> Visited;
while (S && !isa<DISubprogram>(S)) {
S = dyn_cast_or_null<DILocalScope>(S->getScope());
if (Visited.contains(S))
if (!Visited.insert(S).second)
break;
Visited.insert(S);
}
ParentSubprogram[InitialScope] = llvm::dyn_cast_or_null<DISubprogram>(S);

Expand Down

0 comments on commit 6f6100f

Please sign in to comment.