[LLVMdev] Modifing an operand of MDNode
jgu222 at gmail.com
Tue Jun 8 11:27:48 PDT 2010
On Tue, Jun 8, 2010 at 9:33 AM, Chris Lattner <clattner at apple.com> wrote:
> 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.)
> Hi Junjie,
> 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