Skip to content

Commit 3362e99

Browse files
committed
Assert that a function exists
Created using spr 1.3.4
1 parent 9771235 commit 3362e99

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bolt/lib/Profile/BoltAddressTranslation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,7 @@ std::unordered_map<uint32_t, std::vector<uint32_t>>
521521
BoltAddressTranslation::getBFBranches(uint64_t OutputAddress) const {
522522
std::unordered_map<uint32_t, std::vector<uint32_t>> Branches;
523523
auto FuncIt = Maps.find(OutputAddress);
524-
if (FuncIt == Maps.end())
525-
return Branches;
524+
assert(FuncIt != Maps.end());
526525
std::vector<uint32_t> InputOffsets;
527526
for (const auto &KV : FuncIt->second)
528527
InputOffsets.emplace_back(KV.second);

0 commit comments

Comments
 (0)