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 | 4a3125ba29d6d52b0a4dbb4966d505c87627d198 (patch) | |
tree | c951904bdacf557c81e901b2bd997d7352c0377f /llvm/lib/VMCore/Instructions.cpp | |
parent | f873ed1b10080bb40ffd0ee3cee909613a447dd9 (diff) | |
download | bcm5719-llvm-4a3125ba29d6d52b0a4dbb4966d505c87627d198.tar.gz bcm5719-llvm-4a3125ba29d6d52b0a4dbb4966d505c87627d198.zip |
Implement the ExtractValueInst::getIndexedType that accepts one
index value.
llvm-svn: 52432
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index 80a24f9ff9f..604f9f94a1c 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, |