aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-17 19:35:42 +0000
committerChris Lattner <sabre@nondot.org>2005-11-17 19:35:42 +0000
commitceda605fd7d0e3532a22743538c6d118fe5e40c1 (patch)
tree8ff23e88f094ddb78a3ae69ef9789c7738e6b7c1 /lib/Transforms
parent9ba13e4aeff453cdc8ed26fb927ec65dd44625b4 (diff)
downloadexternal_llvm-ceda605fd7d0e3532a22743538c6d118fe5e40c1.zip
external_llvm-ceda605fd7d0e3532a22743538c6d118fe5e40c1.tar.gz
external_llvm-ceda605fd7d0e3532a22743538c6d118fe5e40c1.tar.bz2
This was checking the wrong GEP expression. Fixing this fixes a gccas crash
compiling mysql reported by Ted Kremenek. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index f2b812d..bf735af 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -162,7 +162,7 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN,
if (CE->getOperand(NumOps-1)->isNullValue()) {
// Check to make sure the last index really is an array index.
gep_type_iterator GTI = gep_type_begin(GEPI);
- for (unsigned i = 1, e = GEPI->getNumOperands()-1;
+ for (unsigned i = 1, e = CE->getNumOperands()-1;
i != e; ++i, ++GTI)
/*empty*/;
if (isa<SequentialType>(*GTI)) {