Metadata RAUW


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,

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.


Thank you Michael.

I have came across the comment in Metadata.h but your explanation’d make it much clearer.