diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-01-05 20:07:06 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-01-05 20:07:06 +0000 |
commit | a81a6dff0d7748f05637ac07a6da7a150094c88f (patch) | |
tree | 1b3a270ef2188a38b14c94ad5c724dc369b84cbc /llvm/lib/VMCore/Constants.cpp | |
parent | 76aa677ec348ce6e88a5af977b135a05799419d4 (diff) | |
download | bcm5719-llvm-a81a6dff0d7748f05637ac07a6da7a150094c88f.tar.gz bcm5719-llvm-a81a6dff0d7748f05637ac07a6da7a150094c88f.zip |
Convert a ton of simple integer type equality tests to the new predicate.
llvm-svn: 92760
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 2279d6c12db..73973e1afc2 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -1689,7 +1689,7 @@ Constant *ConstantExpr::getExtractElementTy(const Type *ReqTy, Constant *Val, Constant *ConstantExpr::getExtractElement(Constant *Val, Constant *Idx) { assert(isa<VectorType>(Val->getType()) && "Tried to create extractelement operation on non-vector type!"); - assert(Idx->getType() == Type::getInt32Ty(Val->getContext()) && + assert(Idx->getType()->isInteger(32) && "Extractelement index must be i32 type!"); return getExtractElementTy(cast<VectorType>(Val->getType())->getElementType(), Val, Idx); @@ -1716,7 +1716,7 @@ Constant *ConstantExpr::getInsertElement(Constant *Val, Constant *Elt, "Tried to create insertelement operation on non-vector type!"); assert(Elt->getType() == cast<VectorType>(Val->getType())->getElementType() && "Insertelement types must match!"); - assert(Idx->getType() == Type::getInt32Ty(Val->getContext()) && + assert(Idx->getType()->isInteger(32) && "Insertelement index must be i32 type!"); return getInsertElementTy(Val->getType(), Val, Elt, Idx); } |