Skip to content

Commit f8bd98b

Browse files
[Analysis] Avoid repeated hash lookups (NFC) (#110378)
1 parent 8cfc99b commit f8bd98b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/include/llvm/Analysis/EHUtils.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ static void computeEHOnlyBlocks(FunctionT &F, DenseSet<BlockT *> &EHBlocks) {
2424
DenseMap<BlockT *, Status> Statuses;
2525

2626
auto GetStatus = [&](BlockT *BB) {
27-
if (Statuses.contains(BB))
28-
return Statuses[BB];
29-
else
30-
return Unknown;
27+
auto It = Statuses.find(BB);
28+
return It != Statuses.end() ? It->second : Unknown;
3129
};
3230

3331
auto CheckPredecessors = [&](BlockT *BB, Status Stat) {

0 commit comments

Comments
 (0)