Thank you Michael.
I have came across the comment in Metadata.h but your explanation'd make it
much clearer.
Son Tuan Vu
On Tue, Jul 31, 2018 at 12:31 AM, Michael Kruse <llvmdev at meinersbur.de>
wrote:
> RAUW on metadata is only possible for temporary nodes. Other
> (non-distinct) nodes are merged when they are equal, so replacing one
> node could also replace them in unrelated locations and potentially
> dangerous. For instance, adding an element to list. The list could be
> initially empty (!{}), thus this could replace any empty list
> regardless of context.
>
> However, replacing distinct metadata notes would be feasible. I'd look
> into how RAUW works on temporary nodes and try to apply it on distinct
> MDNodes as well.
>
> Michael
>
>
>
>
>
> 2018-07-30 16:22 GMT-05:00 Son Tuan VU via llvm-dev <
> llvm-dev at lists.llvm.org>:
> > Hello,
> >
> > Does anyone know if it is possible to RAUW the Metadata? I took a look
at
> > the source for it and IIUC, it is not possible. What should I do to
> > implement the RAUW for DINode (more precisely DILocation)?
> >
> > Thank you for your help,
> >
> > Son Tuan Vu
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20180731/c60225fb/attachment.html>