forked from OSchip/llvm-project
[InstructionCombining] Fixed null check after dereferencing warning. NFCI.
This commit is contained in:
parent
8262a5b701
commit
8308187fd9
|
@ -1724,6 +1724,7 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
|||
|
||||
// The first two arguments can vary for any GEP, the rest have to be
|
||||
// static for struct slots
|
||||
assert(CurTy && "No current type?");
|
||||
if (J > 1 && CurTy->isStructTy())
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue