Modifing an operand of MDNode

I have a MDNode, and one of its operand is an int. I'd like to
assign a new int value to that operand during the llvm optimization.
What is the right way to do this ? (There is no setOperand() with
MDNode class.)

Junjie

Hi Junjie,

MDNodes are uniqued, so you can't change them. Just make a new MDNode with the new operand list you want.

-Chris

Hi Chris,

Thanks.
Junjie