[all-commits] [llvm/llvm-project] c320df: [LLVM-C] Add bindings to `Instruction::getDbgRecor...

Michal Rostecki via All-commits all-commits at lists.llvm.org
Fri Sep 20 06:35:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c320df4a2c9d7be10caea9a423d2bfbdcaae6a39
      https://github.com/llvm/llvm-project/commit/c320df4a2c9d7be10caea9a423d2bfbdcaae6a39
  Author: Michal Rostecki <vadorovsky at protonmail.com>
  Date:   2024-09-20 (Fri, 20 Sep 2024)

  Changed paths:
    M llvm/docs/ReleaseNotes.rst
    M llvm/docs/RemoveDIsDebugInfo.md
    M llvm/include/llvm-c/Core.h
    M llvm/lib/IR/Core.cpp
    M llvm/test/Bindings/llvm-c/debug_info_new_format.ll
    M llvm/tools/llvm-c-test/debuginfo.c

  Log Message:
  -----------
  [LLVM-C] Add bindings to `Instruction::getDbgRecordRange()` (#107802)

Since the migration from `@llvm.dbg.value` intrinsic to `#dbg_value`
records, there is no way to retrieve the debug records for an
`Instruction` in LLVM-C API.

Previously, with debug info intrinsics, retrieving debug info for an
`Instruction` could be done with `LLVMGetNextInstructions`, because the
intrinsic call was also an instruction.

However, to be able to retrieve debug info with the current LLVM, where
debug records are used, the `getDbgRecordRange()` iterator needs to be
exposed.

Add new functions for DbgRecord sequence traversal:
  LLVMGetFirstDbgRecord
  LLVMGetLastDbgRecord
  LLVMGetNextDbgRecord
  LLVMGetPreviousDbgRecord

See llvm/docs/RemoveDIsDebugInfo.md and release notes.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list