diff options
author | Devang Patel <dpatel@apple.com> | 2008-02-20 19:26:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-02-20 19:26:55 +0000 |
commit | dcad9da0bc5325b8e9b2e641675a557e5466e164 (patch) | |
tree | 95651bc96a31d739937ddb0bdfbb8d17c85710f4 /llvm/lib/VMCore/Instructions.cpp | |
parent | 949173da7fce46c85e8e8406fdb67e536d7bf5ef (diff) | |
download | bcm5719-llvm-dcad9da0bc5325b8e9b2e641675a557e5466e164.tar.gz bcm5719-llvm-dcad9da0bc5325b8e9b2e641675a557e5466e164.zip |
getresult type is the type of indexed aggregate element
llvm-svn: 47392
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index d700902a256..c1e583375a2 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -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); |