Skip to content

Commit d224a03

Browse files
committed
[SCEV] Use insert_or_assign() (NFC)
1 parent f21c2fa commit d224a03

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/include/llvm/Analysis/ScalarEvolution.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,9 +1656,7 @@ class ScalarEvolution {
16561656
DenseMap<const SCEV *, ConstantRange> &Cache =
16571657
Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges;
16581658

1659-
auto Pair = Cache.try_emplace(S, std::move(CR));
1660-
if (!Pair.second)
1661-
Pair.first->second = std::move(CR);
1659+
auto Pair = Cache.insert_or_assign(S, std::move(CR));
16621660
return Pair.first->second;
16631661
}
16641662

0 commit comments

Comments
 (0)