From 4a3125ba29d6d52b0a4dbb4966d505c87627d198 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 17 Jun 2008 21:07:55 +0000 Subject: [PATCH] Implement the ExtractValueInst::getIndexedType that accepts one index value. llvm-svn: 52432 --- llvm/lib/VMCore/Instructions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index 80a24f9ff9f3..604f9f94a1c1 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -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,