mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
getresult type is the type of indexed aggregate element
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c3f844cb8
commit
474869f2b2
@ -2367,11 +2367,6 @@ public:
|
||||
|
||||
virtual GetResultInst *clone() const;
|
||||
|
||||
// getType - Get aggregate value element type
|
||||
inline const Type *getType() const {
|
||||
return Aggr->getType();
|
||||
}
|
||||
|
||||
inline Value *getAggregateValue() {
|
||||
return getOperand(0);
|
||||
}
|
||||
|
@ -2708,7 +2708,7 @@ void SwitchInst::setSuccessorV(unsigned idx, BasicBlock *B) {
|
||||
GetResultInst::GetResultInst(Value *Aggregate, unsigned Index,
|
||||
const std::string &Name,
|
||||
Instruction *InsertBef)
|
||||
: Instruction(Aggr->getType(),
|
||||
: Instruction(cast<StructType>(Aggregate->getType())->getElementType(Index),
|
||||
GetResult, &Aggr, 1, InsertBef) {
|
||||
assert(isValidOperands(Aggregate, Index) && "Invalid GetResultInst operands!");
|
||||
Aggr.init(Aggregate, this);
|
||||
|
Loading…
Reference in New Issue
Block a user