[cfe-dev] clang builtin function attributes

Taewook Oh via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 5 11:28:16 PDT 2016


Hello,

Unlike gcc, clang does not provide builtin functions for functions in ctype.h, such as tolower. To generated better optimized code, I'm planning to add these functions as builtins with attributes. Regarding this, I have a few questions:


  1.  In "Attributes in Clang" page (http://clang.llvm.org/docs/AttributeReference.html), "nothrow" and "const" are not in the list while they are still used in Builtins.def. Are these attributes deprecated?
  2.  (Assuming they are not deprecated) Is there a place that I can find definitions for attributes used in builtins.def? In particular, I wonder if "const" attributes of clang has same meaning with gcc's "const" attribute, as it seems that clang does not support "pure" attribute.

Thanks,
Taewook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160405/1e694412/attachment.html>


More information about the cfe-dev mailing list