From 28977af72a11fcad5d1b54d7a96b3df02828f6fc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 5 Apr 2004 01:30:19 +0000 Subject: Support getelementptr instructions which use uint's to index into structure types and can have arbitrary 32- and 64-bit integer types indexing into sequential types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12653 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/Local.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Analysis/DataStructure/Local.cpp') 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(GEP.getOperand(1)) || + !cast(GEP.getOperand(1))->isNullValue())) { // If we already know this is an array being accessed, don't do anything... if (!TopTypeRec.isArray) { -- cgit v1.2.3-70-g09d2