[LLVMdev] [RFC] NoBuiltin Attribute

Chris Lattner clattner at apple.com
Mon Feb 18 18:08:24 PST 2013


On Feb 18, 2013, at 5:01 PM, Chandler Carruth <chandlerc at google.com> wrote:
> > In the context of LTO, it makes sense for the attribute to be on function bodies, not on prototypes.
> >
> Yeah, I noticed that after sending this patch. I modified it to check the function CI is in for that attribute. Once we have support for the `-fno-builtin-FUNCTION' flag, I expect the attribute to look something like this:
> 
>         "no-builtin-functions" = "puts,foo,bar"
> 
> I wonder... why not attach the no-builtin attribute to the call instruction? It seems like that would avoid the need of a string attribute altogether, having the frontend match up calls to specific functions which should not be considered calls to builtin functions?

How does this work?  If I build with -fno-builtin-fputs, why would an attribute be added to a call to printf?

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130218/372556b0/attachment.html>


More information about the llvm-dev mailing list