summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDávid Bolvanský <david.bolvansky@gmail.com>2019-11-03 20:10:46 +0100
committerDávid Bolvanský <david.bolvansky@gmail.com>2019-11-03 20:10:46 +0100
commit8308187fd9bfa08ffad0a636d4dd1d25e7de5a76 (patch)
tree24014b7a7f95a2edabba1e1233188e2f74e016ae /llvm/lib
parent8262a5b70163f3136635625a6e15d401009c838d (diff)
downloadbcm5719-llvm-8308187fd9bfa08ffad0a636d4dd1d25e7de5a76.tar.gz
bcm5719-llvm-8308187fd9bfa08ffad0a636d4dd1d25e7de5a76.zip
[InstructionCombining] Fixed null check after dereferencing warning. NFCI.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index c4f9be0a15d..897c29e619c 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;
OpenPOWER on IntegriCloud