diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-05-13 07:09:08 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-05-13 07:09:08 +0000 |
commit | 9ebab9c9a31e0a5c4e8f6228bbbcf4bf15341366 (patch) | |
tree | fd936214130baaac32038facee26a4d1e8436e14 /lib/VMCore/Instructions.cpp | |
parent | 66a636e07c90c7270b673406f2bac1bfea81ea8b (diff) | |
download | external_llvm-9ebab9c9a31e0a5c4e8f6228bbbcf4bf15341366.zip external_llvm-9ebab9c9a31e0a5c4e8f6228bbbcf4bf15341366.tar.gz external_llvm-9ebab9c9a31e0a5c4e8f6228bbbcf4bf15341366.tar.bz2 |
Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 14 |
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); } |