Skip to content

Commit 649072b

Browse files
authored
Merge pull request #78970 from eeckstein/fix-is-deinit-barrier
BasicCalleeAnalysis: don't crash if the `bca` argument to `isDeinitBarrier` is null
2 parents 6a3011d + 631bee4 commit 649072b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Analysis/BasicCalleeAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ getMemoryBehavior(FullApplySite as, bool observeRetains) {
7575

7676
bool swift::isDeinitBarrier(SILInstruction *const instruction,
7777
BasicCalleeAnalysis *bca) {
78-
if (!instructionIsDeinitBarrierFunction) {
78+
if (!instructionIsDeinitBarrierFunction || !bca) {
7979
return mayBeDeinitBarrierNotConsideringSideEffects(instruction);
8080
}
8181
BridgedInstruction inst = {

0 commit comments

Comments
 (0)