aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 26bd17bde3..c969cc6621 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -350,7 +350,8 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) {
#if 0
// Handle the pointer index specially...
if (GEP.getNumOperands() > 1 &&
- GEP.getOperand(1) != ConstantSInt::getNullValue(Type::LongTy)) {
+ (!isa<Constant>(GEP.getOperand(1)) ||
+ !cast<Constant>(GEP.getOperand(1))->isNullValue())) {
// If we already know this is an array being accessed, don't do anything...
if (!TopTypeRec.isArray) {