[llvm] [LLVM-C] Add bindings to `Instruction::getDbgRecordRange()` (PR #107802)
Michal Rostecki via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 15 09:44:56 PDT 2024
================
@@ -3682,6 +3682,33 @@ LLVMValueRef LLVMInstructionClone(LLVMValueRef Inst);
*/
LLVMValueRef LLVMIsATerminatorInst(LLVMValueRef Inst);
+/**
+ * Obtain the first debug record attached to an instruction.
+ *
+ * The returned debug record can be used as an iterator. You will likely
+ * eventually call into LLVMGetNextDbgRecord() with it.
+ *
+ * @see llvm::Instruction::getDbgRecordRange()
+ */
+LLVMDbgRecordRef LLVMGetFirstDbgRecord(LLVMValueRef Inst);
+
+/**
+ * Obtain the last debug record attached to an instruction.
+ *
+ * @see llvm::Instruction::getDbgRecordRange()
+ */
+LLVMDbgRecordRef LLVMGetLastDbgRecord(LLVMValueRef Inst);
+
+/**
+ * Advance a debug record iterator.
+ */
+LLVMDbgRecordRef LLVMGetNextDbgRecord(LLVMDbgRecordRef DbgRecord);
+
+/**
+ * Go backwards in a debug record iterator.
----------------
vadorovsky wrote:
Done, I reworded it to "Obtain the next DbgRecord..."
https://github.com/llvm/llvm-project/pull/107802
More information about the llvm-commits
mailing list