mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
eliminate use of methods that take vectors as args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1746,7 +1746,8 @@ ConstExpr: CastOps '(' ConstVal TO Types ')' {
|
|||||||
GEN_ERROR("GetElementPtr requires a pointer operand");
|
GEN_ERROR("GetElementPtr requires a pointer operand");
|
||||||
|
|
||||||
const Type *IdxTy =
|
const Type *IdxTy =
|
||||||
GetElementPtrInst::getIndexedType($3->getType(), *$4, true);
|
GetElementPtrInst::getIndexedType($3->getType(), &(*$4)[0], $4->size(),
|
||||||
|
true);
|
||||||
if (!IdxTy)
|
if (!IdxTy)
|
||||||
GEN_ERROR("Index list invalid for constant getelementptr");
|
GEN_ERROR("Index list invalid for constant getelementptr");
|
||||||
|
|
||||||
@@ -2859,12 +2860,12 @@ MemoryInst : MALLOC Types OptCAlign {
|
|||||||
if (!isa<PointerType>($2->get()))
|
if (!isa<PointerType>($2->get()))
|
||||||
GEN_ERROR("getelementptr insn requires pointer operand");
|
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 '" +
|
GEN_ERROR("Invalid getelementptr indices for type '" +
|
||||||
(*$2)->getDescription()+ "'");
|
(*$2)->getDescription()+ "'");
|
||||||
Value* tmpVal = getVal(*$2, $3);
|
Value* tmpVal = getVal(*$2, $3);
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
$$ = new GetElementPtrInst(tmpVal, *$4);
|
$$ = new GetElementPtrInst(tmpVal, &(*$4)[0], $4->size());
|
||||||
delete $2;
|
delete $2;
|
||||||
delete $4;
|
delete $4;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user