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 f873ed1b10
commit 4a3125ba29
1 changed files with 6 additions and 0 deletions

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,