Splitting a basic block creates an instruction without debug metadata


I'm not sure if this is really a problem or not, but I noticed that if you're working with bitcode that has debug metadata, and you split a BasicBlock using llvm::SplitBlock or BasicBlock::splitBasicBlock, the unconditional branch added to the new block will lack debug metadata. This turned out not to be a problem for me, since my analysis pass needs only one instruction in the block to have metadata, but perhaps it will be a problem for others. Ignoring for now the issue of just how to manufacture the metadata for the new instruction, is this a bug?


It'd be good to have location info attached with newly created unconditional branch.

Okay, filed as bug #8510.