diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-12 05:26:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-12 05:26:21 +0000 |
commit | 6ebfbf5092e34836b17087f7b13af8afb20e1604 (patch) | |
tree | 779ba4faf6db74744fb80fe39739fed97a5f4ea8 | |
parent | 1cf9dd21dcb923b9aea3fab1e0959a59775bfc36 (diff) | |
download | bcm5719-llvm-6ebfbf5092e34836b17087f7b13af8afb20e1604.tar.gz bcm5719-llvm-6ebfbf5092e34836b17087f7b13af8afb20e1604.zip |
simplify assertions to not be completely redundant.
llvm-svn: 134968
-rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 57498b48592..f29afa7980e 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -1716,26 +1716,13 @@ Constant *ConstantExpr::getShuffleVector(Constant *V1, Constant *V2, Constant *ConstantExpr::getInsertValue(Constant *Agg, Constant *Val, const unsigned *Idxs, unsigned NumIdx) { - assert(Agg->getType()->isFirstClassType() && - "Tried to create insertelement operation on non-first-class type!"); - - const Type *ReqTy = Agg->getType(); - (void)ReqTy; -#ifndef NDEBUG - const Type *ValTy = - ExtractValueInst::getIndexedType(Agg->getType(), Idxs, Idxs+NumIdx); - assert(ValTy == Val->getType() && "insertvalue indices invalid!"); -#endif - assert(ExtractValueInst::getIndexedType(Agg->getType(), Idxs, Idxs+NumIdx) == Val->getType() && "insertvalue indices invalid!"); - assert(Agg->getType() == ReqTy && - "insertvalue type invalid!"); assert(Agg->getType()->isFirstClassType() && - "Non-first-class type for constant InsertValue expression"); + "Non-first-class type for constant insertvalue expression"); Constant *FC = ConstantFoldInsertValueInstruction(Agg, Val, Idxs, NumIdx); - assert(FC && "InsertValue constant expr couldn't be folded!"); + assert(FC && "insertvalue constant expr couldn't be folded!"); return FC; } |