Skip to content

Commit 77b309d

Browse files
[AST] Avoid repeated hash lookups (NFC) (#127299)
1 parent b6be53d commit 77b309d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/VTableBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,8 +2115,8 @@ void ItaniumVTableBuilder::dumpLayout(raw_ostream &Out) {
21152115

21162116
// Dump the next address point.
21172117
uint64_t NextIndex = Index + 1;
2118-
if (AddressPointsByIndex.count(NextIndex)) {
2119-
if (AddressPointsByIndex.count(NextIndex) == 1) {
2118+
if (unsigned Count = AddressPointsByIndex.count(NextIndex)) {
2119+
if (Count == 1) {
21202120
const BaseSubobject &Base =
21212121
AddressPointsByIndex.find(NextIndex)->second;
21222122

0 commit comments

Comments
 (0)