/// Provide fast operand accessors
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
- /// getNumArgOperands - Return the number of funcletpad arguments.
+ /// arg_size - Return the number of funcletpad arguments.
///
- unsigned getNumArgOperands() const { return getNumOperands() - 1; }
+ unsigned arg_size() const { return getNumOperands() - 1; }
/// Convenience accessors
: bitc::FUNC_CODE_INST_CLEANUPPAD;
pushValue(FuncletPad.getParentPad(), InstID, Vals);
- unsigned NumArgOperands = FuncletPad.getNumArgOperands();
+ unsigned NumArgOperands = FuncletPad.arg_size();
Vals.push_back(NumArgOperands);
for (unsigned Op = 0; Op != NumArgOperands; ++Op)
pushValueAndType(FuncletPad.getArgOperand(Op), InstID, Vals);
}
} else if (const auto *CPI = dyn_cast<CatchPadInst>(FirstI)) {
- for (unsigned I = CPI->getNumArgOperands(); I != 0; --I) {
+ for (unsigned I = CPI->arg_size(); I != 0; --I) {
Value *TypeInfo = CPI->getArgOperand(I - 1)->stripPointerCasts();
addCatchTypeInfo(LandingPad, dyn_cast<GlobalValue>(TypeInfo));
}
// In case of single catch (...), we don't emit LSDA, so we don't need
// this information.
bool IsSingleCatchAllClause =
- CPI->getNumArgOperands() == 1 &&
+ CPI->arg_size() == 1 &&
cast<Constant>(CPI->getArgOperand(0))->isNullValue();
// cathchpads for longjmp use an empty type list, e.g. catchpad within %0 []
// and they don't need LSDA info
- bool IsCatchLongjmp = CPI->getNumArgOperands() == 0;
+ bool IsCatchLongjmp = CPI->arg_size() == 0;
if (!IsSingleCatchAllClause && !IsCatchLongjmp) {
// Create a mapping from landing pad label to landing pad index.
bool IntrFound = false;
auto *CPI = cast<CatchPadInst>(BB->getFirstNonPHI());
// In case of a single catch (...), we don't need to emit a personalify
// function call
- if (CPI->getNumArgOperands() == 1 &&
+ if (CPI->arg_size() == 1 &&
cast<Constant>(CPI->getArgOperand(0))->isNullValue())
prepareEHPad(BB, false);
else
// Create the entry for this cleanup with the appropriate handler
// properties. Finally and fault handlers are distinguished by arity.
ClrHandlerType HandlerType =
- (Cleanup->getNumArgOperands() ? ClrHandlerType::Fault
- : ClrHandlerType::Finally);
+ (Cleanup->arg_size() ? ClrHandlerType::Fault
+ : ClrHandlerType::Finally);
int CleanupState = addClrEHHandler(FuncInfo, HandlerParentState, -1,
HandlerType, 0, Pad->getParent());
// Queue any child EH pads on the worklist.
Out << " within ";
writeOperand(FPI->getParentPad(), /*PrintType=*/false);
Out << " [";
- for (unsigned Op = 0, NumOps = FPI->getNumArgOperands(); Op < NumOps;
- ++Op) {
+ for (unsigned Op = 0, NumOps = FPI->arg_size(); Op < NumOps; ++Op) {
if (Op > 0)
Out << ", ";
writeOperand(FPI->getArgOperand(Op), /*PrintType=*/true);
unsigned LLVMGetNumArgOperands(LLVMValueRef Instr) {
if (FuncletPadInst *FPI = dyn_cast<FuncletPadInst>(unwrap(Instr))) {
- return FPI->getNumArgOperands();
+ return FPI->arg_size();
}
return unwrap<CallBase>(Instr)->arg_size();
}