mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Implement the two constructors in InsertValueInst and ExtractValueInst.
Add a Name argment to two init methods in these classes as well to make things a bit more consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1458,8 +1458,8 @@ class ExtractValueInst : public Instruction {
|
||||
SmallVector<unsigned, 4> Indices;
|
||||
|
||||
ExtractValueInst(const ExtractValueInst &EVI);
|
||||
void init(Value *Agg, const unsigned *Idx, unsigned NumIdx);
|
||||
void init(Value *Agg, unsigned Idx);
|
||||
void init(Value *Agg, const unsigned *Idx, unsigned NumIdx, const std::string &Name);
|
||||
void init(Value *Agg, unsigned Idx, const std::string &Name);
|
||||
|
||||
template<typename InputIterator>
|
||||
void init(Value *Agg, InputIterator IdxBegin, InputIterator IdxEnd,
|
||||
@@ -1476,10 +1476,8 @@ class ExtractValueInst : public Instruction {
|
||||
assert(NumIdx > 0 && "ExtractValueInst must have at least one index");
|
||||
|
||||
// This requires that the iterator points to contiguous memory.
|
||||
init(Agg, &*IdxBegin, NumIdx); // FIXME: for the general case
|
||||
// we have to build an array here
|
||||
|
||||
setName(Name);
|
||||
init(Agg, &*IdxBegin, NumIdx, Name); // FIXME: for the general case
|
||||
// we have to build an array here
|
||||
}
|
||||
|
||||
/// getIndexedType - Returns the type of the element that would be extracted
|
||||
@@ -1667,8 +1665,8 @@ class InsertValueInst : public Instruction {
|
||||
|
||||
void *operator new(size_t, unsigned); // Do not implement
|
||||
InsertValueInst(const InsertValueInst &IVI);
|
||||
void init(Value *Agg, Value *Val, const unsigned *Idx, unsigned NumIdx);
|
||||
void init(Value *Agg, Value *Val, unsigned Idx);
|
||||
void init(Value *Agg, Value *Val, const unsigned *Idx, unsigned NumIdx, const std::string &Name);
|
||||
void init(Value *Agg, Value *Val, unsigned Idx, const std::string &Name);
|
||||
|
||||
template<typename InputIterator>
|
||||
void init(Value *Agg, Value *Val,
|
||||
@@ -1686,10 +1684,8 @@ class InsertValueInst : public Instruction {
|
||||
assert(NumIdx > 0 && "InsertValueInst must have at least one index");
|
||||
|
||||
// This requires that the iterator points to contiguous memory.
|
||||
init(Agg, Val, &*IdxBegin, NumIdx); // FIXME: for the general case
|
||||
// we have to build an array here
|
||||
|
||||
setName(Name);
|
||||
init(Agg, Val, &*IdxBegin, NumIdx, Name); // FIXME: for the general case
|
||||
// we have to build an array here
|
||||
}
|
||||
|
||||
/// Constructors - Create a insertvalue instruction with a base aggregate
|
||||
|
||||
Reference in New Issue
Block a user