projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89c6048
)
Be more restrictive with the index types we allow for sequential types
author
Chris Lattner
<sabre@nondot.org>
Mon, 5 Apr 2004 01:25:21 +0000
(
01:25
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 5 Apr 2004 01:25:21 +0000
(
01:25
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12650
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/DerivedTypes.h
patch
|
blob
|
history
diff --git
a/include/llvm/DerivedTypes.h
b/include/llvm/DerivedTypes.h
index b53ecd276d076b51f194ecc387e1d1d9fa448872..ffa9551b8da26069adeec90515f09cdfcba3cb93 100644
(file)
--- a/
include/llvm/DerivedTypes.h
+++ b/
include/llvm/DerivedTypes.h
@@
-263,7
+263,16
@@
public:
return ContainedTys[0];
}
virtual bool indexValid(const Value *V) const {
- return V->getType()->isInteger();
+ const Type *Ty = V->getType();
+ switch (Ty->getPrimitiveID()) {
+ case Type::IntTyID:
+ case Type::UIntTyID:
+ case Type::LongTyID:
+ case Type::ULongTyID:
+ return true;
+ default:
+ return false;
+ }
}
// Methods for support type inquiry through isa, cast, and dyn_cast: