[Mlir-commits] [mlir] 80e3936 - [lldb, mlir] Migrate from getNumArgOperands and arg_operands (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Thu Oct 7 08:29:54 PDT 2021
Author: Kazu Hirata
Date: 2021-10-07T08:29:42-07:00
New Revision: 80e39366ee403ac420f2087883550398e5fbf968
URL: https://github.com/llvm/llvm-project/commit/80e39366ee403ac420f2087883550398e5fbf968
DIFF: https://github.com/llvm/llvm-project/commit/80e39366ee403ac420f2087883550398e5fbf968.diff
LOG: [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.
Added:
Modified:
lldb/source/Expression/IRInterpreter.cpp
lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
Removed:
################################################################################
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp
index 788520d1f32bf..9b2af56dfc8a2 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 5655d548ee344..f80dc2b144672 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 199a8c49aca8c..ab37d60b6dbee 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;
More information about the Mlir-commits
mailing list