Index: include/llvm/CodeGen/GlobalISel/CallLowering.h =================================================================== --- include/llvm/CodeGen/GlobalISel/CallLowering.h +++ include/llvm/CodeGen/GlobalISel/CallLowering.h @@ -102,7 +102,8 @@ virtual bool assignArg(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, const ArgInfo &Info, CCState &State) { - return AssignFn(ValNo, ValVT, LocVT, LocInfo, Info.Flags, State); + return AssignFn ? + AssignFn(ValNo, ValVT, LocVT, LocInfo, Info.Flags, State) : false; } MachineIRBuilder &MIRBuilder; @@ -126,13 +127,6 @@ void setArgFlags(ArgInfo &Arg, unsigned OpNum, const DataLayout &DL, const FuncInfoTy &FuncInfo) const; - /// Invoke Handler::assignArg on each of the given \p Args and then use - /// \p Callback to move them to the assigned locations. - /// - /// \return True if everything has succeeded, false otherwise. - bool handleAssignments(MachineIRBuilder &MIRBuilder, ArrayRef Args, - ValueHandler &Callback) const; - public: CallLowering(const TargetLowering *TLI) : TLI(TLI) {} virtual ~CallLowering() = default; @@ -188,6 +182,14 @@ return false; } + /// Invoke Handler::assignArg on each of the given \p Args and then use + /// \p Callback to move them to the assigned locations. + /// + /// \return True if everything has succeeded, false otherwise. + virtual bool handleAssignments(MachineIRBuilder &MIRBuilder, + ArrayRef Args, + ValueHandler &Handler) const; + /// Lower the given call instruction, including argument and return value /// marshalling. ///