llvm.org GIT mirror llvm / e01dfba
[GISel]: Add some helper constructors to MIRBuilder https://reviews.llvm.org/D36636 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310860 91177308-0d34-0410-b5e6-96231b3b80d8 Aditya Nandakumar 2 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8484 addUsesFromArgs(MIB, std::forward(Args)...);
8585 }
8686 public:
87 /// Some constructors for easy use.
88 MachineIRBuilder() = default;
89 MachineIRBuilder(MachineFunction &MF) { setMF(MF); }
90 MachineIRBuilder(MachineInstr &MI)
91 : MachineIRBuilder(*MI.getParent()->getParent()) {
92 setInstr(MI);
93 }
94
8795 /// Getter for the function we currently build.
8896 MachineFunction &getMF() {
8997 assert(MF && "MachineFunction is not set");