diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-05 01:30:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-05 01:30:19 +0000 |
commit | 69193f93b689d3cc03ec9e685d662003d06134ea (patch) | |
tree | ed36e2aa107383c32cc79bfb71deb1547afed277 /llvm/lib/Analysis/DataStructure | |
parent | fd9fbe187d9d4143f07f575f0722f185ab0ce945 (diff) | |
download | bcm5719-llvm-69193f93b689d3cc03ec9e685d662003d06134ea.tar.gz bcm5719-llvm-69193f93b689d3cc03ec9e685d662003d06134ea.zip |
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.
llvm-svn: 12653
Diffstat (limited to 'llvm/lib/Analysis/DataStructure')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Local.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 26bd17bde3f..c969cc6621b 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/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) { |