Question about assertion code in 'BuildMI' function with MachineBasicBlock

Hi all,

While I using BuildMI with MachineBasicBlock as parameter, I made a mistake. The mistake was that the MachineBasicBlock of instruction, which is for insertion, is different with given MachineBasicBlock as parameter. I have thought if there is assertion code to check whether MachineBasicBlocks are same between instruction's MachineBasicBlock and given MachineBasicBlock as parameter or not, it might be so useful to find wrong code. How do you feel about this? Is it useful or not? In order to do this, I have attached a simple patch. If there is something wrong, please let me know.

Thanks,
JinGu Kang

llvm.patch (1.1 KB)