Now that we can create standalone basic blocks, it's useful to be able to append them. Add bindings to
- Insert a basic block after the current insertion block
- Append a basic block to the end of a function's list of basic blocks
Differential D59658
[LLVM-C] Add bindings to insert basic blocks CodaFi on Mar 21 2019, 11:28 AM. Authored by
Details Now that we can create standalone basic blocks, it's useful to be able to append them. Add bindings to
Diff Detail
Event TimelineComment Actions I think the names are confusing. Why not something like LLVMInsertExistingBasicBlock and LLVMAppendExistingBasicBlock? Comment Actions Like to match LLVMInsertBasicBlock and LLVMAppendBasicBlock? The former's semantics don't really match its pair function. LLVMInsertBasicBlock is used to insert before another block where LLVMInsertBasicBlockAfterInsertBlock inserts at the current global insertion point. I agree with the LLVMAppendExistingBasicBlock name change. Comment Actions Agreed; I think it should still have Existing in the name if it takes a reference to a block, to distinguish from the existing set of (somewhat poorly named) functions. |