llvm-project/llvm/test/Bindings/llvm-c/replace_md_operand.ll
Davide Bertola c7d95ba051 [llvm-c] add LLVMReplaceMDNodeOperandWith
I'm working on a tool that visits debug info and massages it using the
llvm-c API. I noticed that LLVMGetOperand special cases MDNodes so I
can get their operands, but I can't replace them. This patch adds
LLVMReplaceMDNodeOperandWith which boils down to
MDNode::replaceOperandWith.

The name was chosen for consistency with LLVMGetMDNodeOperands and
LLVMGetMDNodeNumOperands.

Differential Revision: https://reviews.llvm.org/D136637
2023-01-31 09:58:03 -08:00

3 lines
88 B
LLVM

; RUN: llvm-c-test --replace-md-operand < /dev/null
; This used to trigger an assertion