summaryrefslogtreecommitdiff
path: root/include/llvm/IR/Instructions.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-02-25 03:34:17 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-02-25 03:34:17 +0000
commit3d9b85c7543611b39ae903723589a942d10496ea (patch)
tree1fab886ab34f4a620c79bfba5142e5d0f1ff3c21 /include/llvm/IR/Instructions.h
parent88546b6641dc7c1d79f38b1a52f9b31807cb0a77 (diff)
downloadllvm-3d9b85c7543611b39ae903723589a942d10496ea.tar.gz
llvm-3d9b85c7543611b39ae903723589a942d10496ea.tar.bz2
llvm-3d9b85c7543611b39ae903723589a942d10496ea.tar.xz
Add some convenience accessors for the underlying Use of an operand.
These complement many of the existing accessors and make it significantly easier to write code which needs to poke at the underlying Use without hard coding the operand number at which it resides for a particular instruction. No functionality changed of course. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR/Instructions.h')
-rw-r--r--include/llvm/IR/Instructions.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/IR/Instructions.h b/include/llvm/IR/Instructions.h
index eeea9945e8..786fa8cdc2 100644
--- a/include/llvm/IR/Instructions.h
+++ b/include/llvm/IR/Instructions.h
@@ -1259,6 +1259,10 @@ public:
Value *getArgOperand(unsigned i) const { return getOperand(i); }
void setArgOperand(unsigned i, Value *v) { setOperand(i, v); }
+ /// \brief Wrappers for getting the \c Use of a call argument.
+ const Use &getArgOperandUse(unsigned i) const { return getOperandUse(i); }
+ Use &getArgOperandUse(unsigned i) { return getOperandUse(i); }
+
/// getCallingConv/setCallingConv - Get or set the calling convention of this
/// function call.
CallingConv::ID getCallingConv() const {
@@ -2903,6 +2907,10 @@ public:
Value *getArgOperand(unsigned i) const { return getOperand(i); }
void setArgOperand(unsigned i, Value *v) { setOperand(i, v); }
+ /// \brief Wrappers for getting the \c Use of a call argument.
+ const Use &getArgOperandUse(unsigned i) const { return getOperandUse(i); }
+ Use &getArgOperandUse(unsigned i) { return getOperandUse(i); }
+
/// getCallingConv/setCallingConv - Get or set the calling convention of this
/// function call.
CallingConv::ID getCallingConv() const {