Index: include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h =================================================================== --- include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h +++ include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h @@ -85,6 +85,14 @@ addUsesFromArgs(MIB, std::forward(Args)...); } public: + /// Some constructors for easy use. + MachineIRBuilder() = default; + MachineIRBuilder(MachineFunction &MF) { setMF(MF); } + MachineIRBuilder(MachineFunction &MF, MachineInstr &MI) { + setMF(MF); + setInstr(MI); + } + /// Getter for the function we currently build. MachineFunction &getMF() { assert(MF && "MachineFunction is not set");