[LLVMdev] Modifing an operand of MDNode
clattner at apple.com
Tue Jun 8 09:33:19 PDT 2010
On Jun 7, 2010, at 3:35 PM, Junjie Gu wrote:
> 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.)
MDNodes are uniqued, so you can't change them. Just make a new MDNode with the new operand list you want.
More information about the llvm-dev