[LLVMdev] Modifing an operand of MDNode

Junjie Gu jgu222 at gmail.com
Tue Jun 8 11:27:48 PDT 2010


Hi Chris,

Thanks.
Junjie

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.
>
> -Chris




More information about the llvm-dev mailing list