summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2008-08-30 15:41:51 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2008-08-30 15:41:51 +0000
commitb52d1ed7e9e2c7980b0959991468b34d04c9f6e7 (patch)
tree11d2140c4a173b76ea8bfe57e500041851180501 /llvm
parenta719239719c55164c1a6c4b3168be04b251a3ce0 (diff)
downloadbcm5719-llvm-b52d1ed7e9e2c7980b0959991468b34d04c9f6e7.tar.gz
bcm5719-llvm-b52d1ed7e9e2c7980b0959991468b34d04c9f6e7.zip
Fix ConstantExpr::getInsertElement.
Breakage was exposed in the Ocaml bindings tests after Chris uncommented an assertion in r55084. llvm-svn: 55566
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/VMCore/Constants.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index c253e815883..4471cfde34d 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -2316,8 +2316,7 @@ Constant *ConstantExpr::getInsertElement(Constant *Val, Constant *Elt,
&& "Insertelement types must match!");
assert(Idx->getType() == Type::Int32Ty &&
"Insertelement index must be i32 type!");
- return getInsertElementTy(cast<VectorType>(Val->getType())->getElementType(),
- Val, Elt, Idx);
+ return getInsertElementTy(Val->getType(), Val, Elt, Idx);
}
Constant *ConstantExpr::getShuffleVectorTy(const Type *ReqTy, Constant *V1,
OpenPOWER on IntegriCloud