Skip to content

Commit 4cff8ef

Browse files
[ProfileData] Use DenseMap::lookup (NFC) (#94818)
1 parent 4c28844 commit 4cff8ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/include/llvm/ProfileData/InstrProf.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,7 @@ Function* InstrProfSymtab::getFunction(uint64_t FuncMD5Hash) {
729729
}
730730

731731
GlobalVariable *InstrProfSymtab::getGlobalVariable(uint64_t MD5Hash) {
732-
if (auto Iter = MD5VTableMap.find(MD5Hash); Iter != MD5VTableMap.end())
733-
return Iter->second;
734-
return nullptr;
732+
return MD5VTableMap.lookup(MD5Hash);
735733
}
736734

737735
// To store the sums of profile count values, or the percentage of

0 commit comments

Comments
 (0)