[LLVMdev] BuildMI declarations inconsistency?

Krzysztof Parzyszek kparzysz at codeaurora.org
Sat Dec 1 06:58:24 PST 2012


Why do these two guys take a pointer to the basic block, whereas all 
other BuildMI functions take a reference?  They are not checking for 
null or anything and I didn't see any potential declaration conflicts. 
Am I missing something?  Is there a reason for this?

inline MachineInstrBuilder BuildMI(MachineBasicBlock *BB,
                                    DebugLoc DL,
                                    const MCInstrDesc &MCID) {
   return BuildMI(*BB, BB->end(), DL, MCID);
}

inline MachineInstrBuilder BuildMI(MachineBasicBlock *BB,
                                    DebugLoc DL,
                                    const MCInstrDesc &MCID,
                                    unsigned DestReg) {
   return BuildMI(*BB, BB->end(), DL, MCID, DestReg);
}


-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list