Removing metadata from LLVM Instruction

Hi,

an older thread about removing metadata says to use “setMetadata(Kind, nullptr)” to drop the metadata from the instruction.
I have using this method without success.
When I look at inside the IR code the metadata are still there, any idea why is that?

Thanks.
Best,
Simone

That should work. Can you reproduce this ToT?

I think it actually works, but it does not really remove the metadata from the .ll file when clang outputs it.

Simone

In that case, it's likely that there's another reference to the same metadata node.