[llvm] 3081de8 - [llvm] Migrate from getNumArgOperands to arg_size (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 5 08:29:30 PDT 2021
Author: Kazu Hirata
Date: 2021-10-05T08:29:19-07:00
New Revision: 3081de8c72fc9b6c0cc8b1bb5f02858b78ebaa4c
URL: https://github.com/llvm/llvm-project/commit/3081de8c72fc9b6c0cc8b1bb5f02858b78ebaa4c
DIFF: https://github.com/llvm/llvm-project/commit/3081de8c72fc9b6c0cc8b1bb5f02858b78ebaa4c.diff
LOG: [llvm] Migrate from getNumArgOperands to arg_size (NFC)
Note that getNumArgOperands is considered a legacy name. See
llvm/include/llvm/IR/InstrTypes.h for details.
Added:
Modified:
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
llvm/unittests/IR/InstructionsTest.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 23d6132f185f9..dcab20b4b5857 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2917,8 +2917,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
// Emit type/value pairs for varargs params.
if (FTy->isVarArg()) {
- for (unsigned i = FTy->getNumParams(), e = II->getNumArgOperands();
- i != e; ++i)
+ for (unsigned i = FTy->getNumParams(), e = II->arg_size(); i != e; ++i)
pushValueAndType(I.getOperand(i), InstID, Vals); // vararg
}
break;
@@ -2999,8 +2998,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
// Emit type/value pairs for varargs params.
if (FTy->isVarArg()) {
- for (unsigned i = FTy->getNumParams(), e = CBI->getNumArgOperands();
- i != e; ++i)
+ for (unsigned i = FTy->getNumParams(), e = CBI->arg_size(); i != e; ++i)
pushValueAndType(I.getOperand(i), InstID, Vals); // vararg
}
break;
@@ -3164,8 +3162,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
// Emit type/value pairs for varargs params.
if (FTy->isVarArg()) {
- for (unsigned i = FTy->getNumParams(), e = CI.getNumArgOperands();
- i != e; ++i)
+ for (unsigned i = FTy->getNumParams(), e = CI.arg_size(); i != e; ++i)
pushValueAndType(CI.getArgOperand(i), InstID, Vals); // varargs
}
break;
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
index 04d349f6f940b..43b95a41c4dbe 100644
--- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
@@ -228,14 +228,14 @@ TEST_F(OpenMPIRBuilderTest, CreateBarrier) {
CallInst *GTID = dyn_cast<CallInst>(&BB->front());
EXPECT_NE(GTID, nullptr);
- EXPECT_EQ(GTID->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID->arg_size(), 1U);
EXPECT_EQ(GTID->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID->getCalledFunction()->doesNotFreeMemory());
CallInst *Barrier = dyn_cast<CallInst>(GTID->getNextNode());
EXPECT_NE(Barrier, nullptr);
- EXPECT_EQ(Barrier->getNumArgOperands(), 2U);
+ EXPECT_EQ(Barrier->arg_size(), 2U);
EXPECT_EQ(Barrier->getCalledFunction()->getName(), "__kmpc_barrier");
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotFreeMemory());
@@ -272,14 +272,14 @@ TEST_F(OpenMPIRBuilderTest, CreateCancel) {
CallInst *GTID = dyn_cast<CallInst>(&BB->front());
EXPECT_NE(GTID, nullptr);
- EXPECT_EQ(GTID->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID->arg_size(), 1U);
EXPECT_EQ(GTID->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID->getCalledFunction()->doesNotFreeMemory());
CallInst *Cancel = dyn_cast<CallInst>(GTID->getNextNode());
EXPECT_NE(Cancel, nullptr);
- EXPECT_EQ(Cancel->getNumArgOperands(), 3U);
+ EXPECT_EQ(Cancel->arg_size(), 3U);
EXPECT_EQ(Cancel->getCalledFunction()->getName(), "__kmpc_cancel");
EXPECT_FALSE(Cancel->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(Cancel->getCalledFunction()->doesNotFreeMemory());
@@ -290,13 +290,13 @@ TEST_F(OpenMPIRBuilderTest, CreateCancel) {
EXPECT_EQ(CancelBBTI->getSuccessor(1)->size(), 3U);
CallInst *GTID1 = dyn_cast<CallInst>(&CancelBBTI->getSuccessor(1)->front());
EXPECT_NE(GTID1, nullptr);
- EXPECT_EQ(GTID1->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID1->arg_size(), 1U);
EXPECT_EQ(GTID1->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID1->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID1->getCalledFunction()->doesNotFreeMemory());
CallInst *Barrier = dyn_cast<CallInst>(GTID1->getNextNode());
EXPECT_NE(Barrier, nullptr);
- EXPECT_EQ(Barrier->getNumArgOperands(), 2U);
+ EXPECT_EQ(Barrier->arg_size(), 2U);
EXPECT_EQ(Barrier->getCalledFunction()->getName(), "__kmpc_cancel_barrier");
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotFreeMemory());
@@ -345,14 +345,14 @@ TEST_F(OpenMPIRBuilderTest, CreateCancelIfCond) {
CallInst *GTID = dyn_cast<CallInst>(&BB->front());
EXPECT_NE(GTID, nullptr);
- EXPECT_EQ(GTID->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID->arg_size(), 1U);
EXPECT_EQ(GTID->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID->getCalledFunction()->doesNotFreeMemory());
CallInst *Cancel = dyn_cast<CallInst>(GTID->getNextNode());
EXPECT_NE(Cancel, nullptr);
- EXPECT_EQ(Cancel->getNumArgOperands(), 3U);
+ EXPECT_EQ(Cancel->arg_size(), 3U);
EXPECT_EQ(Cancel->getCalledFunction()->getName(), "__kmpc_cancel");
EXPECT_FALSE(Cancel->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(Cancel->getCalledFunction()->doesNotFreeMemory());
@@ -364,13 +364,13 @@ TEST_F(OpenMPIRBuilderTest, CreateCancelIfCond) {
EXPECT_EQ(CancelBBTI->getSuccessor(1)->size(), 3U);
CallInst *GTID1 = dyn_cast<CallInst>(&CancelBBTI->getSuccessor(1)->front());
EXPECT_NE(GTID1, nullptr);
- EXPECT_EQ(GTID1->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID1->arg_size(), 1U);
EXPECT_EQ(GTID1->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID1->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID1->getCalledFunction()->doesNotFreeMemory());
CallInst *Barrier = dyn_cast<CallInst>(GTID1->getNextNode());
EXPECT_NE(Barrier, nullptr);
- EXPECT_EQ(Barrier->getNumArgOperands(), 2U);
+ EXPECT_EQ(Barrier->arg_size(), 2U);
EXPECT_EQ(Barrier->getCalledFunction()->getName(), "__kmpc_cancel_barrier");
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotFreeMemory());
@@ -414,14 +414,14 @@ TEST_F(OpenMPIRBuilderTest, CreateCancelBarrier) {
CallInst *GTID = dyn_cast<CallInst>(&BB->front());
EXPECT_NE(GTID, nullptr);
- EXPECT_EQ(GTID->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID->arg_size(), 1U);
EXPECT_EQ(GTID->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID->getCalledFunction()->doesNotFreeMemory());
CallInst *Barrier = dyn_cast<CallInst>(GTID->getNextNode());
EXPECT_NE(Barrier, nullptr);
- EXPECT_EQ(Barrier->getNumArgOperands(), 2U);
+ EXPECT_EQ(Barrier->arg_size(), 2U);
EXPECT_EQ(Barrier->getCalledFunction()->getName(), "__kmpc_cancel_barrier");
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(Barrier->getCalledFunction()->doesNotFreeMemory());
@@ -575,7 +575,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelSimple) {
ASSERT_NE(ForkCI, nullptr);
EXPECT_EQ(ForkCI->getCalledFunction()->getName(), "__kmpc_fork_call");
- EXPECT_EQ(ForkCI->getNumArgOperands(), 4U);
+ EXPECT_EQ(ForkCI->arg_size(), 4U);
EXPECT_TRUE(isa<GlobalVariable>(ForkCI->getArgOperand(0)));
EXPECT_EQ(ForkCI->getArgOperand(1),
ConstantInt::get(Type::getInt32Ty(Ctx), 1U));
@@ -669,7 +669,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelNested) {
ASSERT_NE(ForkCI, nullptr);
EXPECT_EQ(ForkCI->getCalledFunction()->getName(), "__kmpc_fork_call");
- EXPECT_EQ(ForkCI->getNumArgOperands(), 3U);
+ EXPECT_EQ(ForkCI->arg_size(), 3U);
EXPECT_TRUE(isa<GlobalVariable>(ForkCI->getArgOperand(0)));
EXPECT_EQ(ForkCI->getArgOperand(1),
ConstantInt::get(Type::getInt32Ty(Ctx), 0U));
@@ -777,7 +777,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelNested2Inner) {
ASSERT_NE(ForkCI, nullptr);
EXPECT_EQ(ForkCI->getCalledFunction()->getName(), "__kmpc_fork_call");
- EXPECT_EQ(ForkCI->getNumArgOperands(), 3U);
+ EXPECT_EQ(ForkCI->arg_size(), 3U);
EXPECT_TRUE(isa<GlobalVariable>(ForkCI->getArgOperand(0)));
EXPECT_EQ(ForkCI->getArgOperand(1),
ConstantInt::get(Type::getInt32Ty(Ctx), 0U));
@@ -892,7 +892,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelIfCond) {
}
EXPECT_EQ(ForkCI->getCalledFunction()->getName(), "__kmpc_fork_call");
- EXPECT_EQ(ForkCI->getNumArgOperands(), 4U);
+ EXPECT_EQ(ForkCI->arg_size(), 4U);
EXPECT_TRUE(isa<GlobalVariable>(ForkCI->getArgOperand(0)));
EXPECT_EQ(ForkCI->getArgOperand(1),
ConstantInt::get(Type::getInt32Ty(Ctx), 1));
@@ -900,7 +900,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelIfCond) {
EXPECT_EQ(StoredForkArg, F->arg_begin());
EXPECT_EQ(DirectCI->getCalledFunction(), OutlinedFn);
- EXPECT_EQ(DirectCI->getNumArgOperands(), 3U);
+ EXPECT_EQ(DirectCI->arg_size(), 3U);
EXPECT_TRUE(isa<AllocaInst>(DirectCI->getArgOperand(0)));
EXPECT_TRUE(isa<AllocaInst>(DirectCI->getArgOperand(1)));
Value *StoredDirectArg =
@@ -1922,7 +1922,7 @@ TEST_P(OpenMPIRBuilderTestWithParams, DynamicWorkShareLoop) {
ASSERT_NE(InitCall, nullptr);
EXPECT_EQ(InitCall->getCalledFunction()->getName(),
"__kmpc_dispatch_init_4u");
- EXPECT_EQ(InitCall->getNumArgOperands(), 7U);
+ EXPECT_EQ(InitCall->arg_size(), 7U);
EXPECT_EQ(InitCall->getArgOperand(6), ConstantInt::get(LCTy, ChunkSize));
ConstantInt *SchedVal = cast<ConstantInt>(InitCall->getArgOperand(2));
EXPECT_EQ(SchedVal->getValue(), static_cast<uint64_t>(SchedType));
@@ -2035,7 +2035,7 @@ TEST_F(OpenMPIRBuilderTest, MasterDirective) {
EXPECT_TRUE(isa<CallInst>(CondInst->getOperand(0)));
CallInst *MasterEntryCI = cast<CallInst>(CondInst->getOperand(0));
- EXPECT_EQ(MasterEntryCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(MasterEntryCI->arg_size(), 2U);
EXPECT_EQ(MasterEntryCI->getCalledFunction()->getName(), "__kmpc_master");
EXPECT_TRUE(isa<GlobalVariable>(MasterEntryCI->getArgOperand(0)));
@@ -2050,7 +2050,7 @@ TEST_F(OpenMPIRBuilderTest, MasterDirective) {
}
}
EXPECT_NE(MasterEndCI, nullptr);
- EXPECT_EQ(MasterEndCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(MasterEndCI->arg_size(), 2U);
EXPECT_TRUE(isa<GlobalVariable>(MasterEndCI->getArgOperand(0)));
EXPECT_EQ(MasterEndCI->getArgOperand(1), MasterEntryCI->getArgOperand(1));
}
@@ -2117,7 +2117,7 @@ TEST_F(OpenMPIRBuilderTest, MaskedDirective) {
EXPECT_TRUE(isa<CallInst>(CondInst->getOperand(0)));
CallInst *MaskedEntryCI = cast<CallInst>(CondInst->getOperand(0));
- EXPECT_EQ(MaskedEntryCI->getNumArgOperands(), 3U);
+ EXPECT_EQ(MaskedEntryCI->arg_size(), 3U);
EXPECT_EQ(MaskedEntryCI->getCalledFunction()->getName(), "__kmpc_masked");
EXPECT_TRUE(isa<GlobalVariable>(MaskedEntryCI->getArgOperand(0)));
@@ -2132,7 +2132,7 @@ TEST_F(OpenMPIRBuilderTest, MaskedDirective) {
}
}
EXPECT_NE(MaskedEndCI, nullptr);
- EXPECT_EQ(MaskedEndCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(MaskedEndCI->arg_size(), 2U);
EXPECT_TRUE(isa<GlobalVariable>(MaskedEndCI->getArgOperand(0)));
EXPECT_EQ(MaskedEndCI->getArgOperand(1), MaskedEntryCI->getArgOperand(1));
}
@@ -2191,7 +2191,7 @@ TEST_F(OpenMPIRBuilderTest, CriticalDirective) {
}
}
EXPECT_NE(CriticalEntryCI, nullptr);
- EXPECT_EQ(CriticalEntryCI->getNumArgOperands(), 3U);
+ EXPECT_EQ(CriticalEntryCI->arg_size(), 3U);
EXPECT_EQ(CriticalEntryCI->getCalledFunction()->getName(), "__kmpc_critical");
EXPECT_TRUE(isa<GlobalVariable>(CriticalEntryCI->getArgOperand(0)));
@@ -2207,7 +2207,7 @@ TEST_F(OpenMPIRBuilderTest, CriticalDirective) {
}
}
EXPECT_NE(CriticalEndCI, nullptr);
- EXPECT_EQ(CriticalEndCI->getNumArgOperands(), 3U);
+ EXPECT_EQ(CriticalEndCI->arg_size(), 3U);
EXPECT_TRUE(isa<GlobalVariable>(CriticalEndCI->getArgOperand(0)));
EXPECT_EQ(CriticalEndCI->getArgOperand(1), CriticalEntryCI->getArgOperand(1));
PointerType *CriticalNamePtrTy =
@@ -2286,14 +2286,14 @@ TEST_F(OpenMPIRBuilderTest, OrderedDirectiveDependSource) {
CallInst *GTID = dyn_cast<CallInst>(DependBaseAddrGEP->getNextNode());
ASSERT_NE(GTID, nullptr);
- EXPECT_EQ(GTID->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID->arg_size(), 1U);
EXPECT_EQ(GTID->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID->getCalledFunction()->doesNotFreeMemory());
CallInst *Depend = dyn_cast<CallInst>(GTID->getNextNode());
ASSERT_NE(Depend, nullptr);
- EXPECT_EQ(Depend->getNumArgOperands(), 3U);
+ EXPECT_EQ(Depend->arg_size(), 3U);
EXPECT_EQ(Depend->getCalledFunction()->getName(), "__kmpc_doacross_post");
EXPECT_TRUE(isa<GlobalVariable>(Depend->getArgOperand(0)));
EXPECT_EQ(Depend->getArgOperand(1), GTID);
@@ -2370,14 +2370,14 @@ TEST_F(OpenMPIRBuilderTest, OrderedDirectiveDependSink) {
CallInst *GTID = dyn_cast<CallInst>(DependBaseAddrGEP->getNextNode());
ASSERT_NE(GTID, nullptr);
- EXPECT_EQ(GTID->getNumArgOperands(), 1U);
+ EXPECT_EQ(GTID->arg_size(), 1U);
EXPECT_EQ(GTID->getCalledFunction()->getName(), "__kmpc_global_thread_num");
EXPECT_FALSE(GTID->getCalledFunction()->doesNotAccessMemory());
EXPECT_FALSE(GTID->getCalledFunction()->doesNotFreeMemory());
CallInst *Depend = dyn_cast<CallInst>(GTID->getNextNode());
ASSERT_NE(Depend, nullptr);
- EXPECT_EQ(Depend->getNumArgOperands(), 3U);
+ EXPECT_EQ(Depend->arg_size(), 3U);
EXPECT_EQ(Depend->getCalledFunction()->getName(), "__kmpc_doacross_wait");
EXPECT_TRUE(isa<GlobalVariable>(Depend->getArgOperand(0)));
EXPECT_EQ(Depend->getArgOperand(1), GTID);
@@ -2440,7 +2440,7 @@ TEST_F(OpenMPIRBuilderTest, OrderedDirectiveThreads) {
}
}
EXPECT_NE(OrderedEntryCI, nullptr);
- EXPECT_EQ(OrderedEntryCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(OrderedEntryCI->arg_size(), 2U);
EXPECT_EQ(OrderedEntryCI->getCalledFunction()->getName(), "__kmpc_ordered");
EXPECT_TRUE(isa<GlobalVariable>(OrderedEntryCI->getArgOperand(0)));
@@ -2455,7 +2455,7 @@ TEST_F(OpenMPIRBuilderTest, OrderedDirectiveThreads) {
}
}
EXPECT_NE(OrderedEndCI, nullptr);
- EXPECT_EQ(OrderedEndCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(OrderedEndCI->arg_size(), 2U);
EXPECT_TRUE(isa<GlobalVariable>(OrderedEndCI->getArgOperand(0)));
EXPECT_EQ(OrderedEndCI->getArgOperand(1), OrderedEntryCI->getArgOperand(1));
}
@@ -2627,7 +2627,7 @@ TEST_F(OpenMPIRBuilderTest, SingleDirective) {
EXPECT_TRUE(isa<CallInst>(CondInst->getOperand(0)));
CallInst *SingleEntryCI = cast<CallInst>(CondInst->getOperand(0));
- EXPECT_EQ(SingleEntryCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(SingleEntryCI->arg_size(), 2U);
EXPECT_EQ(SingleEntryCI->getCalledFunction()->getName(), "__kmpc_single");
EXPECT_TRUE(isa<GlobalVariable>(SingleEntryCI->getArgOperand(0)));
@@ -2642,7 +2642,7 @@ TEST_F(OpenMPIRBuilderTest, SingleDirective) {
}
}
EXPECT_NE(SingleEndCI, nullptr);
- EXPECT_EQ(SingleEndCI->getNumArgOperands(), 2U);
+ EXPECT_EQ(SingleEndCI->arg_size(), 2U);
EXPECT_TRUE(isa<GlobalVariable>(SingleEndCI->getArgOperand(0)));
EXPECT_EQ(SingleEndCI->getArgOperand(1), SingleEntryCI->getArgOperand(1));
}
@@ -3767,7 +3767,7 @@ TEST_F(OpenMPIRBuilderTest, EmitMapperCall) {
CallInst *MapperCall = dyn_cast<CallInst>(&BB->back());
EXPECT_NE(MapperCall, nullptr);
- EXPECT_EQ(MapperCall->getNumArgOperands(), 9U);
+ EXPECT_EQ(MapperCall->arg_size(), 9U);
EXPECT_EQ(MapperCall->getCalledFunction()->getName(),
"__tgt_target_data_begin_mapper");
EXPECT_EQ(MapperCall->getOperand(0), SrcLocInfo);
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp
index 4bc718a9c9997..f3fc08ca583c6 100644
--- a/llvm/unittests/IR/InstructionsTest.cpp
+++ b/llvm/unittests/IR/InstructionsTest.cpp
@@ -638,7 +638,7 @@ TEST(InstructionsTest, AlterCallBundles) {
OperandBundleDef NewBundle("after", ConstantInt::get(Int32Ty, 7));
std::unique_ptr<CallInst> Clone(CallInst::Create(Call.get(), NewBundle));
- EXPECT_EQ(Call->getNumArgOperands(), Clone->getNumArgOperands());
+ EXPECT_EQ(Call->arg_size(), Clone->arg_size());
EXPECT_EQ(Call->getArgOperand(0), Clone->getArgOperand(0));
EXPECT_EQ(Call->getCallingConv(), Clone->getCallingConv());
EXPECT_EQ(Call->getTailCallKind(), Clone->getTailCallKind());
@@ -671,7 +671,7 @@ TEST(InstructionsTest, AlterInvokeBundles) {
InvokeInst::Create(Invoke.get(), NewBundle));
EXPECT_EQ(Invoke->getNormalDest(), Clone->getNormalDest());
EXPECT_EQ(Invoke->getUnwindDest(), Clone->getUnwindDest());
- EXPECT_EQ(Invoke->getNumArgOperands(), Clone->getNumArgOperands());
+ EXPECT_EQ(Invoke->arg_size(), Clone->arg_size());
EXPECT_EQ(Invoke->getArgOperand(0), Clone->getArgOperand(0));
EXPECT_EQ(Invoke->getCallingConv(), Clone->getCallingConv());
EXPECT_TRUE(Clone->hasFnAttr(Attribute::AttrKind::Cold));
More information about the llvm-commits
mailing list