Question about assertion code in 'BuildMI' function with MachineBasicBlock

JinGu Kang jingu at
Wed Dec 11 04:00:45 PST 2013

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.

JinGu Kang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.patch
Type: text/x-patch
Size: 1123 bytes
Desc: not available
URL: <>

More information about the llvm-commits mailing list