diff options
author | Kazu Hirata <kazu@google.com> | 2021-10-07 08:29:42 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-10-07 08:29:42 -0700 |
commit | 80e39366ee403ac420f2087883550398e5fbf968 (patch) | |
tree | fd59b41739e275d45393f05ce7421001bce19cf6 | |
parent | 5be266db7ab2c16072d1669aaa01c9dfac0dc9bc (diff) | |
download | llvm-80e39366ee403ac420f2087883550398e5fbf968.zip llvm-80e39366ee403ac420f2087883550398e5fbf968.tar.gz llvm-80e39366ee403ac420f2087883550398e5fbf968.tar.bz2 |
[lldb, mlir] Migrate from getNumArgOperands and arg_operands (NFC)
Note that getNumArgOperands and arg_operands are considered legacy
names. See llvm/include/llvm/IR/InstrTypes.h for details.
-rw-r--r-- | lldb/source/Expression/IRInterpreter.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp | 2 | ||||
-rw-r--r-- | mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 788520d..9b2af56d 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -1398,7 +1398,7 @@ bool IRInterpreter::Interpret(llvm::Module &module, llvm::Function &function, } // Find number of arguments - const int numArgs = call_inst->getNumArgOperands(); + const int numArgs = call_inst->arg_size(); // We work with a fixed array of 16 arguments which is our upper limit static lldb_private::ABI::CallArgument rawArgs[16]; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp index 5655d54..f80dc2b 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -1303,7 +1303,7 @@ bool IRForTarget::MaybeHandleCallArguments(CallInst *Old) { LLDB_LOG(log, "MaybeHandleCallArguments({0})", PrintValue(Old)); - for (unsigned op_index = 0, num_ops = Old->getNumArgOperands(); + for (unsigned op_index = 0, num_ops = Old->arg_size(); op_index < num_ops; ++op_index) // conservatively believe that this is a store if (!MaybeHandleVariable(Old->getArgOperand(op_index))) { diff --git a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp index 199a8c4..ab37d60 100644 --- a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp +++ b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp @@ -653,7 +653,7 @@ LogicalResult Importer::processInstruction(llvm::Instruction *inst) { llvm::CallInst *ci = cast<llvm::CallInst>(inst); SmallVector<Value, 4> ops; ops.reserve(inst->getNumOperands()); - for (auto &op : ci->arg_operands()) { + for (auto &op : ci->args()) { Value arg = processValue(op.get()); if (!arg) return failure(); @@ -705,7 +705,7 @@ LogicalResult Importer::processInstruction(llvm::Instruction *inst) { SmallVector<Value, 4> ops; ops.reserve(inst->getNumOperands() + 1); - for (auto &op : ii->arg_operands()) + for (auto &op : ii->args()) ops.push_back(processValue(op.get())); SmallVector<Value, 4> normalArgs, unwindArgs; |