aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index d34aa59..cea496d 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -2734,14 +2734,12 @@ void SwitchInst::setSuccessorV(unsigned idx, BasicBlock *B) {
GetResultInst::GetResultInst(Value *Aggregate, unsigned Index,
const std::string &Name,
Instruction *InsertBef)
- : Instruction(cast<StructType>(Aggregate->getType())->getElementType(Index),
- GetResult,
- OperandTraits<GetResultInst>::op_begin(this),
- OperandTraits<GetResultInst>::operands(this),
- InsertBef) {
- assert(isValidOperands(Aggregate, Index) && "Invalid GetResultInst operands!");
- Op<0>().init(Aggregate, this);
- Idx = Index;
+ : UnaryInstruction(cast<StructType>(Aggregate->getType())
+ ->getElementType(Index),
+ GetResult, Aggregate, InsertBef),
+ Idx(Index) {
+ assert(isValidOperands(Aggregate, Index)
+ && "Invalid GetResultInst operands!");
setName(Name);
}