[llvm] [RemoveDIs] Add a 'BeforeDbgRecords' parameter to C API isnt insertion functions (PR #92417)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 08:59:31 PDT 2024


OCHyams wrote:

Ok I've reworked the patch:

* C: Added `LLVMPositionBuilderBeforeDbgRecords` and `LLVMPositionBuilderBeforeInstrAndDbgRecords`. Same as `LLVMPositionBuilder` and `LLVMPositionBuilderBefore` except the insertion position is set to before the debug records that precede the target instruction (the bool parameter has been removed from the new functions).
* OCaml: Added `position_builder_before_dbg_records` which does the same thing as `LLVMPositionBuilderBeforeDbgRecords` and `position_before_dbg_records` which does the same thing as `LLVMPositionBuilderBeforeInstrAndDbgRecords`. The OCaml names are different to and more sensible than the C ones because  unlike the C ones the existing OCaml function names lend themselves to simply appending "before_dbg_records".

https://github.com/llvm/llvm-project/pull/92417


More information about the llvm-commits mailing list