diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-05-04 21:08:13 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-05-04 21:08:13 +0000 |
commit | ce6d6c2e9941ff7307280534ff5570c753236b8f (patch) | |
tree | 936e6b34c3655a188a6b8a949e04450e359016f4 /include/clang/Basic/Builtins.def | |
parent | dfe2be47d8dfef3190459d024252576197ed63c9 (diff) |
Add the Pure attribute to C99 builtin functions from ctype.h. This is a corrected version of r266199 with test case fixes.
Patch by Taewook Oh.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Builtins.def')
-rw-r--r-- | include/clang/Basic/Builtins.def | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def index 7a440cc708..53e77cf35b 100644 --- a/include/clang/Basic/Builtins.def +++ b/include/clang/Basic/Builtins.def @@ -67,6 +67,7 @@ // Builtin::Context class. Currently we have: // n -> nothrow // r -> noreturn +// U -> pure // c -> const // t -> signature is meaningless, use custom typechecking // F -> this is a libc/libm function with a '__builtin_' prefix added. @@ -773,6 +774,22 @@ LIBBUILTIN(sscanf, "icC*RcC*R.", "fs:1:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(vscanf, "icC*Ra", "fS:0:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(vfscanf, "iP*RcC*Ra", "fS:1:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(vsscanf, "icC*RcC*Ra", "fS:1:", "stdio.h", ALL_LANGUAGES) +// C99 ctype.h +LIBBUILTIN(isalnum, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isalpha, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isblank, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(iscntrl, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isdigit, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isgraph, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(islower, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isprint, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(ispunct, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isspace, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isupper, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(isxdigit, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(tolower, "ii", "fnU", "ctype.h", ALL_LANGUAGES) +LIBBUILTIN(toupper, "ii", "fnU", "ctype.h", ALL_LANGUAGES) + // C99 // In some systems setjmp is a macro that expands to _setjmp. We undefine // it here to avoid having two identical LIBBUILTIN entries. |