[X86] Assert that we've found a terminator instruction. NFCI.

Fixes clang static analayzer null dereference warning.
This commit is contained in:
Simon Pilgrim 2020-09-16 16:17:35 +01:00
parent 90777e2924
commit cd46151202
1 changed files with 1 additions and 0 deletions

View File

@ -161,6 +161,7 @@ bool X86SpeculativeExecutionSideEffectSuppression::runOnMachineFunction(
// This branch requires adding an LFENCE.
if (!PrevInstIsLFENCE) {
assert(FirstTerminator && "Unknown terminator instruction");
BuildMI(MBB, FirstTerminator, DebugLoc(), TII->get(X86::LFENCE));
NumLFENCEsInserted++;
Modified = true;