Skip to content

Commit

Permalink
Revert "[IR] Remove arg_operands and getNumArgOperands (NFC)"
Browse files Browse the repository at this point in the history
This reverts commit c72722f.
  • Loading branch information
kazutakahirata committed Oct 6, 2021
1 parent 3dda247 commit 94db1e9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions llvm/include/llvm/IR/InstrTypes.h
Expand Up @@ -1325,6 +1325,16 @@ class CallBase : public Instruction {
bool arg_empty() const { return arg_end() == arg_begin(); }
unsigned arg_size() const { return arg_end() - arg_begin(); }

// Legacy API names that duplicate the above and will be removed once users
// are migrated.
iterator_range<User::op_iterator> arg_operands() {
return make_range(arg_begin(), arg_end());
}
iterator_range<User::const_op_iterator> arg_operands() const {
return make_range(arg_begin(), arg_end());
}
unsigned getNumArgOperands() const { return arg_size(); }

Value *getArgOperand(unsigned i) const {
assert(i < arg_size() && "Out of bounds!");
return getOperand(i);
Expand Down

0 comments on commit 94db1e9

Please sign in to comment.