Skip to content

Commit 52f5d24

Browse files
committed
[clang] Fix null pointer exception in CorrelatedValuePropagation.cpp
1 parent 59c3a52 commit 52f5d24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,8 @@ static bool runImpl(Function &F, LazyValueInfo *LVI, DominatorTree *DT,
11891189
}
11901190

11911191
Instruction *Term = BB->getTerminator();
1192+
if (!Term)
1193+
continue;
11921194
switch (Term->getOpcode()) {
11931195
case Instruction::Switch:
11941196
BBChanged |= processSwitch(cast<SwitchInst>(Term), LVI, DT);

0 commit comments

Comments
 (0)