[cfe-commits] r141803 - in /cfe/trunk: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h lib/AST/DeclPrinter.cpp lib/CodeGen/CGCall.cpp lib/Sema/SemaDecl.cpp test/Analysis/security-syntax-checks.m test/CodeGen/function-attributes.c test/Sema/attr-returns-twice.c

Joerg Sonnenberger joerg at britannica.bec.de
Fri Oct 14 14:51:39 PDT 2011


On Wed, Oct 12, 2011 at 07:51:18PM -0000, Rafael Espindola wrote:
> Author: rafael
> Date: Wed Oct 12 14:51:18 2011
> New Revision: 141803
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=141803&view=rev
> Log:
> Add returns_twice to functions that are known to return twice. This implements
> the same behavior of gcc by keeping the attribute out of the function type.
> 
> @@ -672,6 +673,17 @@
>  // POSIX unistd.h
>  LIBBUILTIN(_exit, "vi",           "fr",    "unistd.h", ALL_LANGUAGES)
>  // POSIX setjmp.h
> +
> +LIBBUILTIN(_setjmp, "iJ",         "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(__sigsetjmp, "iJ",     "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(setjmp, "iJ",          "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(sigsetjmp, "iJ",       "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(setjmp_syscall, "iJ",  "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(savectx, "iJ",         "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(qsetjmp, "iJ",         "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(vfork, "iJ",           "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(getcontext, "iJ",      "fj",   "setjmp.h", ALL_LANGUAGES)
> +
>  LIBBUILTIN(_longjmp, "vJi",       "fr",    "setjmp.h", ALL_LANGUAGES)
>  LIBBUILTIN(siglongjmp, "vSJi",    "fr",    "setjmp.h", ALL_LANGUAGES)
>  // non-standard but very common

The savectx "builtin" creates warning regressions for NetBSD and
supposedly the other BSDs. I can't find any source for savectx and
qsetjmp with google -- at least savectx was originally questioned when
it was added in LLVM. Does anywhere know a system where they do exist?
Otherwise I would advocate to just remove them from the list.

Joerg



More information about the cfe-commits mailing list