Skip to content

Commit 3a445fe

Browse files
atrickairspeedswift
authored andcommitted
Fix the no-swift-assert stdlib build. (#19037)
Partially revert a recent attempt to fix build warnings. Fixes: <rdar://problem/43824067> Swift CI: 1. OSS - Swift (Tools Opt+No Assert, Stdlib Opt+DebInfo, Test Simulator) - OS X (master) - SimplifyCFG crashes at AssertCommon.swift:283:10
1 parent bbb6ca1 commit 3a445fe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,11 @@ static FullApplySite speculateMonomorphicTarget(FullApplySite AI,
218218
NumTargetsPredicted++;
219219

220220
// Devirtualize the apply instruction on the identical path.
221-
assert(devirtualizeClassMethod(IdenAI, DownCastedClassInstance, nullptr) &&
222-
"Expected to be able to devirtualize apply!");
221+
auto NewInst =
222+
devirtualizeClassMethod(IdenAI, DownCastedClassInstance, nullptr);
223+
assert(NewInst && "Expected to be able to devirtualize apply!");
224+
(void)NewInst;
225+
223226
deleteDevirtualizedApply(IdenAI);
224227

225228
// Split critical edges resulting from VirtAI.

0 commit comments

Comments
 (0)