Skip to content

Commit

Permalink
[Profiler] Re-enable an assertion
Browse files Browse the repository at this point in the history
This was disabled as it was hit when attempting to
profile lazy variables. Now that we handle them
correctly, re-enable it.
  • Loading branch information
hamishknight committed Aug 19, 2022
1 parent 64fcbd9 commit 6a6ba83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/SILGen/SILGenFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,8 @@ void SILGenFunction::emitProfilerIncrement(ASTNode N) {
const auto &RegionCounterMap = SP->getRegionCounterMap();
auto CounterIt = RegionCounterMap.find(N);

// TODO: Assert that this cannot happen (rdar://42792053).
if (CounterIt == RegionCounterMap.end())
return;
assert(CounterIt != RegionCounterMap.end() &&
"cannot increment non-existent counter");

auto Int32Ty = getLoweredType(BuiltinIntegerType::get(32, C));
auto Int64Ty = getLoweredType(BuiltinIntegerType::get(64, C));
Expand Down

0 comments on commit 6a6ba83

Please sign in to comment.