[llvm-dev] Removing things from llvm.used

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 28 20:30:48 PST 2018



> On Nov 28, 2018, at 2:30 PM, David Greene via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> What's the proper way to remove something from llvm.used?  I tried RAUW
> undef but that did not go over well.  :)  

Generally you shouldn’t do so: attribute((used)) means that a declaration is used in a way that is unknown to the compiler, so the compiler should keep the thing around unchanged.

> Is it best to delete it and
> re-create it with only the remaining items?

Yes, that would be the correct way to update the list.

-Chris


More information about the llvm-dev mailing list