mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +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:
parent
f7e804b683
commit
c856c7aea6
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user