aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-17 21:07:55 +0000
committerDan Gohman <gohman@apple.com>2008-06-17 21:07:55 +0000
commitb9b0cf278e95c051648e9829865efefc056ca0dc (patch)
treeba82c6cf295fe8819f97b66774512fa72aa92843
parent5ac16ae31a1a7aae5ecc0aa433bd83092f604558 (diff)
downloadexternal_llvm-b9b0cf278e95c051648e9829865efefc056ca0dc.zip
external_llvm-b9b0cf278e95c051648e9829865efefc056ca0dc.tar.gz
external_llvm-b9b0cf278e95c051648e9829865efefc056ca0dc.tar.bz2
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
-rw-r--r--lib/VMCore/Instructions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 80a24f9..604f9f9 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/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,