From 8308187fd9bfa08ffad0a636d4dd1d25e7de5a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Bolvansk=C3=BD?= Date: Sun, 3 Nov 2019 20:10:46 +0100 Subject: [PATCH] [InstructionCombining] Fixed null check after dereferencing warning. NFCI. --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index c4f9be0a15de..897c29e619c8 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -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;