================ @@ -971,8 +979,9 @@ static void prependIndirectCallee(cir::CallOp call, // rebuilt pointee is what makes the lowered call variadic, and only a // variadic call gets the vector-register count that the x86_64 SysV ABI // passes in AL and that the callee's va_arg reads back. - auto calleeFnTy = cast<cir::FuncType>( - cast<cir::PointerType>(calleePtr.getType()).getPointee()); + cir::FuncType calleeFnTy = getIndirectCalleeType(call); + assert((calleeFnTy.isVarArg() || numEllipsisArgs == 0) && ---------------- andykaylor wrote:
Should you also assert that calleeFnTy isn't null before you do this? https://github.com/llvm/llvm-project/pull/227477 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
