Implement the ExtractValueInst::getIndexedType that accepts one

index value.

llvm-svn: 52432
This commit is contained in:
Dan Gohman 2008-06-17 21:07:55 +00:00
parent 10ead77866
commit 24d9c8400f

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,