handle ConstantVector while I'm in here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-01-07 01:20:20 +00:00
parent a0e9a2475c
commit 4039bd0550

View File

@ -2133,6 +2133,9 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val,
if (ConstantArray *CA = dyn_cast<ConstantArray>(Init)) {
for (User::op_iterator i = CA->op_begin(), e = CA->op_end(); i != e; ++i)
Elts.push_back(cast<Constant>(*i));
} else if (ConstantVector *CV = dyn_cast<ConstantVector>(Init)) {
for (User::op_iterator i = CV->op_begin(), e = CV->op_end(); i != e; ++i)
Elts.push_back(cast<Constant>(*i));
} else if (isa<ConstantAggregateZero>(Init)) {
Elts.assign(NumElts, Constant::getNullValue(InitTy->getElementType()));
} else {