<div dir="ltr">Thank you Michael.<div><br></div><div>I have came across the comment in Metadata.h but your explanation'd make it much clearer.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div>
<br><div class="gmail_quote">On Tue, Jul 31, 2018 at 12:31 AM, Michael Kruse <span dir="ltr"><<a href="mailto:llvmdev@meinersbur.de" target="_blank">llvmdev@meinersbur.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">RAUW on metadata is only possible for temporary nodes. Other<br>
(non-distinct) nodes are merged when they are equal, so replacing one<br>
node could also replace them in unrelated locations and potentially<br>
dangerous. For instance, adding an element to list. The list could be<br>
initially empty (!{}), thus this could replace any empty list<br>
regardless of context.<br>
<br>
However, replacing distinct metadata notes would be feasible. I'd look<br>
into how RAUW works on temporary nodes and try to apply it on distinct<br>
MDNodes as well.<br>
<br>
Michael<br>
<div><div class="h5"><br>
<br>
<br>
<br>
<br>
2018-07-30 16:22 GMT-05:00 Son Tuan VU via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>:<br>
> Hello,<br>
><br>
> Does anyone know if it is possible to RAUW the Metadata? I took a look at<br>
> the source for it and IIUC, it is not possible. What should I do to<br>
> implement the RAUW for DINode (more precisely DILocation)?<br>
><br>
> Thank you for your help,<br>
><br>
> Son Tuan Vu<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
><br>
</blockquote></div><br></div>