aboutsummaryrefslogtreecommitdiffstats
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
commitad1cabe5ac258ae0301a7836cef02ab6c86812b3 (patch)
treed9362962e441fa1cfe2879a0b408c99695a7ee47
parent4e8901a99ffd21eb2758f03098adb15bcd5e79df (diff)
downloadexternal_llvm-ad1cabe5ac258ae0301a7836cef02ab6c86812b3.zip
external_llvm-ad1cabe5ac258ae0301a7836cef02ab6c86812b3.tar.gz
external_llvm-ad1cabe5ac258ae0301a7836cef02ab6c86812b3.tar.bz2
Fix ConstantExpr::getInsertElement.
Breakage was exposed in the Ocaml bindings tests after Chris uncommented an assertion in r55084. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55566 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Constants.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index c253e81..4471cfd 100644
--- a/lib/VMCore/Constants.cpp
+++ b/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,