Skip to content

Commit 9648230

Browse files
abhishek-kaushik22aokblast
authored andcommitted
[NFC][CGData] Add assert to StableFunctionMap::at (llvm#164564)
Add assert to `StableFunctionMap::at` to verify `FunctionHash` exists.
1 parent cbbfd9a commit 9648230

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/CGData/StableFunctionMap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ size_t StableFunctionMap::size(SizeType Type) const {
137137
const StableFunctionMap::StableFunctionEntries &
138138
StableFunctionMap::at(HashFuncsMapType::key_type FunctionHash) const {
139139
auto It = HashToFuncs.find(FunctionHash);
140+
assert(It != HashToFuncs.end() && "FunctionHash not found!");
140141
if (isLazilyLoaded())
141142
deserializeLazyLoadingEntry(It);
142143
return It->second.Entries;

0 commit comments

Comments
 (0)