Implement the ExtractValueInst::getIndexedType that accepts one

index value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-06-17 21:07:55 +00:00
parent f26e8557de
commit b79bf1966d

View File

@ -1460,6 +1460,12 @@ const Type* ExtractValueInst::getIndexedType(const Type *Agg,
return CurIdx == NumIdx ? Agg : 0;
}
const Type* ExtractValueInst::getIndexedType(const Type *Agg,
const unsigned Idx) {
const unsigned Idxs[1] = { Idx };
return getIndexedType(Agg, &Idxs[0], 1);
}
ExtractValueInst::ExtractValueInst(Value *Agg,
unsigned Idx,
const std::string &Name,