mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
PR9214: Convert ConstantExpr::getIndices() to return an ArrayRef, plus
related tweaks to ExprMapKeyType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129443 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -771,7 +771,7 @@ bool ConstantExpr::hasIndices() const {
|
||||
getOpcode() == Instruction::InsertValue;
|
||||
}
|
||||
|
||||
const SmallVector<unsigned, 4> &ConstantExpr::getIndices() const {
|
||||
ArrayRef<unsigned> ConstantExpr::getIndices() const {
|
||||
if (const ExtractValueConstantExpr *EVCE =
|
||||
dyn_cast<ExtractValueConstantExpr>(this))
|
||||
return EVCE->Indices;
|
||||
@ -2151,7 +2151,7 @@ void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
|
||||
Constant *Agg = getOperand(0);
|
||||
if (Agg == From) Agg = To;
|
||||
|
||||
const SmallVector<unsigned, 4> &Indices = getIndices();
|
||||
ArrayRef<unsigned> Indices = getIndices();
|
||||
Replacement = ConstantExpr::getExtractValue(Agg,
|
||||
&Indices[0], Indices.size());
|
||||
} else if (getOpcode() == Instruction::InsertValue) {
|
||||
@ -2160,7 +2160,7 @@ void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
|
||||
if (Agg == From) Agg = To;
|
||||
if (Val == From) Val = To;
|
||||
|
||||
const SmallVector<unsigned, 4> &Indices = getIndices();
|
||||
ArrayRef<unsigned> Indices = getIndices();
|
||||
Replacement = ConstantExpr::getInsertValue(Agg, Val,
|
||||
&Indices[0], Indices.size());
|
||||
} else if (isCast()) {
|
||||
|
Reference in New Issue
Block a user