Skip to content

Commit 6a6ba83

Browse files
committed
[Profiler] Re-enable an assertion
This was disabled as it was hit when attempting to profile lazy variables. Now that we handle them correctly, re-enable it.
1 parent 64fcbd9 commit 6a6ba83

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/SILGen/SILGenFunction.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,8 @@ void SILGenFunction::emitProfilerIncrement(ASTNode N) {
11631163
const auto &RegionCounterMap = SP->getRegionCounterMap();
11641164
auto CounterIt = RegionCounterMap.find(N);
11651165

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

11701169
auto Int32Ty = getLoweredType(BuiltinIntegerType::get(32, C));
11711170
auto Int64Ty = getLoweredType(BuiltinIntegerType::get(64, C));

0 commit comments

Comments
 (0)