[LLVMdev] [RFC] NoBuiltin Attribute

Krzysztof Parzyszek kparzysz at codeaurora.org
Tue Feb 19 06:50:53 PST 2013


On 2/18/2013 8:08 PM, Chris Lattner wrote:
>
> That code is presumably compiled by someone.  If whoever compiles it specifies -fno-builtin, the attribute would be added to it.  It doesn't affect its clients.

After reading the description quoted by Bill, I'm not sure what you mean 
by attaching the attribute to the function body.  Suppose I have my own 
version of strlen, written in whatever language and present in an .o 
file, and a function foo in C which calls strlen, which is compiled with 
clang.  It makes sense to put the "nobuiltin" attribute on the prototype 
of "strlen", since this way all the callers of the strlen would know 
what they are dealing with.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list