diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-09-16 16:06:12 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-09-16 16:06:12 +0000 |
commit | e8f1df6446bf6ebf368401b813a0ca8eee69d871 (patch) | |
tree | 98f38cb3f251e85f173c8cb7cbbd3b7c5d459aed /include/llvm/User.h | |
parent | 46fece70c231ed5103253d1e151d4ad4fc1e129a (diff) | |
download | external_llvm-e8f1df6446bf6ebf368401b813a0ca8eee69d871.zip external_llvm-e8f1df6446bf6ebf368401b813a0ca8eee69d871.tar.gz external_llvm-e8f1df6446bf6ebf368401b813a0ca8eee69d871.tar.bz2 |
Add routines to update or erase operands (and to do so without external
assumptions about which operand number stores what operand).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/User.h')
-rw-r--r-- | include/llvm/User.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/User.h b/include/llvm/User.h index e9dea8b..1bd275a 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -34,6 +34,10 @@ public: assert(i < Operands.size() && "setOperand() out of range!"); Operands[i] = Val; } + inline void eraseOperand(unsigned i) { + assert(i < Operands.size() && "setOperand() out of range!"); + Operands.erase(Operands.begin() + i); + } inline unsigned getNumOperands() const { return Operands.size(); } // --------------------------------------------------------------------------- |