eliminate use of methods that take vectors as args

llvm-svn: 34211
This commit is contained in:
Chris Lattner 2007-02-13 00:57:40 +00:00
parent a224f7ba77
commit 04a2d765a1
1 changed files with 4 additions and 3 deletions

View File

@ -1746,7 +1746,8 @@ ConstExpr: CastOps '(' ConstVal TO Types ')' {
GEN_ERROR("GetElementPtr requires a pointer operand");
const Type *IdxTy =
GetElementPtrInst::getIndexedType($3->getType(), *$4, true);
GetElementPtrInst::getIndexedType($3->getType(), &(*$4)[0], $4->size(),
true);
if (!IdxTy)
GEN_ERROR("Index list invalid for constant getelementptr");
@ -2859,12 +2860,12 @@ MemoryInst : MALLOC Types OptCAlign {
if (!isa<PointerType>($2->get()))
GEN_ERROR("getelementptr insn requires pointer operand");
if (!GetElementPtrInst::getIndexedType(*$2, *$4, true))
if (!GetElementPtrInst::getIndexedType(*$2, &(*$4)[0], $4->size(), true))
GEN_ERROR("Invalid getelementptr indices for type '" +
(*$2)->getDescription()+ "'");
Value* tmpVal = getVal(*$2, $3);
CHECK_FOR_ERROR
$$ = new GetElementPtrInst(tmpVal, *$4);
$$ = new GetElementPtrInst(tmpVal, &(*$4)[0], $4->size());
delete $2;
delete $4;
};