diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-17 21:07:55 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-17 21:07:55 +0000 |
commit | b79bf1966dfee044510d365a952ae550091d9d91 (patch) | |
tree | ba82c6cf295fe8819f97b66774512fa72aa92843 /lib | |
parent | f26e8557deccd5fb28b56548ca5f7ea25aee31c6 (diff) | |
download | external_llvm-b79bf1966dfee044510d365a952ae550091d9d91.zip external_llvm-b79bf1966dfee044510d365a952ae550091d9d91.tar.gz external_llvm-b79bf1966dfee044510d365a952ae550091d9d91.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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 6 |
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, |