Skip to content

Commit 870f691

Browse files
committed
Fix "pointer is null" static analyzer warnings. NFCI.
Assert that the pointers are non-null before dereferencing them.
1 parent 9029742 commit 870f691

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ bool HexagonEarlyIfConversion::matchFlowPattern(MachineBasicBlock *B,
282282
// can fall through into the other, in other words, it will be executed
283283
// in both cases. We only want to predicate the block that is executed
284284
// conditionally.
285+
assert(TB && FB && "Failed to find triangle control flow blocks");
285286
unsigned TNP = TB->pred_size(), FNP = FB->pred_size();
286287
unsigned TNS = TB->succ_size(), FNS = FB->succ_size();
287288

0 commit comments

Comments
 (0)