[llvm] a2d3b12 - Revert "[IR] Remove arg_operands and getNumArgOperands (NFC)"
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 8 11:02:09 PDT 2021
Author: Kazu Hirata
Date: 2021-10-08T11:01:56-07:00
New Revision: a2d3b12786bad19cdb7353db69db4e9c8772bd46
URL: https://github.com/llvm/llvm-project/commit/a2d3b12786bad19cdb7353db69db4e9c8772bd46
DIFF: https://github.com/llvm/llvm-project/commit/a2d3b12786bad19cdb7353db69db4e9c8772bd46.diff
LOG: Revert "[IR] Remove arg_operands and getNumArgOperands (NFC)"
This reverts commit b2ee408dde374d6a27a34746fd7c7b5bab97ea89.
Added:
Modified:
llvm/include/llvm/IR/InstrTypes.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index a2180a8d4b2a3..4546e80fc87ad 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -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);
More information about the llvm-commits
mailing list