From c08582ba5eef9383702fd3e434de1a6f2f470e3c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 7 Dec 2009 02:09:14 +0000 Subject: [PATCH] add 'F' to a bunch of libm builtins so that codegen doesn't die on them, pointed out by Charles Davis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90736 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/Builtins.def | 90 ++++++++++++++++---------------- test/CodeGen/exprs.c | 3 ++ 2 files changed, 48 insertions(+), 45 deletions(-) diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def index 98c703d94e..e700cdeb5d 100644 --- a/include/clang/Basic/Builtins.def +++ b/include/clang/Basic/Builtins.def @@ -118,51 +118,51 @@ BUILTIN(__builtin_powf, "fff" , "nc") BUILTIN(__builtin_powl, "LdLdLd", "nc") // Standard unary libc/libm functions with double/float/long double variants: -BUILTIN(__builtin_acos , "dd" , "nc") -BUILTIN(__builtin_acosf, "ff" , "nc") -BUILTIN(__builtin_acosl, "LdLd", "nc") -BUILTIN(__builtin_asin , "dd" , "nc") -BUILTIN(__builtin_asinf, "ff" , "nc") -BUILTIN(__builtin_asinl, "LdLd", "nc") -BUILTIN(__builtin_atan , "dd" , "nc") -BUILTIN(__builtin_atanf, "ff" , "nc") -BUILTIN(__builtin_atanl, "LdLd", "nc") -BUILTIN(__builtin_ceil , "dd" , "nc") -BUILTIN(__builtin_ceilf, "ff" , "nc") -BUILTIN(__builtin_ceill, "LdLd", "nc") -BUILTIN(__builtin_cos , "dd" , "nc") -BUILTIN(__builtin_cosf, "ff" , "nc") -BUILTIN(__builtin_cosh , "dd" , "nc") -BUILTIN(__builtin_coshf, "ff" , "nc") -BUILTIN(__builtin_coshl, "LdLd", "nc") -BUILTIN(__builtin_cosl, "LdLd", "nc") -BUILTIN(__builtin_exp , "dd" , "nc") -BUILTIN(__builtin_expf, "ff" , "nc") -BUILTIN(__builtin_expl, "LdLd", "nc") -BUILTIN(__builtin_floor , "dd" , "nc") -BUILTIN(__builtin_floorf, "ff" , "nc") -BUILTIN(__builtin_floorl, "LdLd", "nc") -BUILTIN(__builtin_log , "dd" , "nc") -BUILTIN(__builtin_log10 , "dd" , "nc") -BUILTIN(__builtin_log10f, "ff" , "nc") -BUILTIN(__builtin_log10l, "LdLd", "nc") -BUILTIN(__builtin_logf, "ff" , "nc") -BUILTIN(__builtin_logl, "LdLd", "nc") -BUILTIN(__builtin_sin , "dd" , "nc") -BUILTIN(__builtin_sinf, "ff" , "nc") -BUILTIN(__builtin_sinh , "dd" , "nc") -BUILTIN(__builtin_sinhf, "ff" , "nc") -BUILTIN(__builtin_sinhl, "LdLd", "nc") -BUILTIN(__builtin_sinl, "LdLd", "nc") -BUILTIN(__builtin_sqrt , "dd" , "nc") -BUILTIN(__builtin_sqrtf, "ff" , "nc") -BUILTIN(__builtin_sqrtl, "LdLd", "nc") -BUILTIN(__builtin_tan , "dd" , "nc") -BUILTIN(__builtin_tanf, "ff" , "nc") -BUILTIN(__builtin_tanh , "dd" , "nc") -BUILTIN(__builtin_tanhf, "ff" , "nc") -BUILTIN(__builtin_tanhl, "LdLd", "nc") -BUILTIN(__builtin_tanl, "LdLd", "nc") +BUILTIN(__builtin_acos , "dd" , "Fnc") +BUILTIN(__builtin_acosf, "ff" , "Fnc") +BUILTIN(__builtin_acosl, "LdLd", "Fnc") +BUILTIN(__builtin_asin , "dd" , "Fnc") +BUILTIN(__builtin_asinf, "ff" , "Fnc") +BUILTIN(__builtin_asinl, "LdLd", "Fnc") +BUILTIN(__builtin_atan , "dd" , "Fnc") +BUILTIN(__builtin_atanf, "ff" , "Fnc") +BUILTIN(__builtin_atanl, "LdLd", "Fnc") +BUILTIN(__builtin_ceil , "dd" , "Fnc") +BUILTIN(__builtin_ceilf, "ff" , "Fnc") +BUILTIN(__builtin_ceill, "LdLd", "Fnc") +BUILTIN(__builtin_cos , "dd" , "Fnc") +BUILTIN(__builtin_cosf, "ff" , "Fnc") +BUILTIN(__builtin_cosh , "dd" , "Fnc") +BUILTIN(__builtin_coshf, "ff" , "Fnc") +BUILTIN(__builtin_coshl, "LdLd", "Fnc") +BUILTIN(__builtin_cosl, "LdLd", "Fnc") +BUILTIN(__builtin_exp , "dd" , "Fnc") +BUILTIN(__builtin_expf, "ff" , "Fnc") +BUILTIN(__builtin_expl, "LdLd", "Fnc") +BUILTIN(__builtin_floor , "dd" , "Fnc") +BUILTIN(__builtin_floorf, "ff" , "Fnc") +BUILTIN(__builtin_floorl, "LdLd", "Fnc") +BUILTIN(__builtin_log , "dd" , "Fnc") +BUILTIN(__builtin_log10 , "dd" , "Fnc") +BUILTIN(__builtin_log10f, "ff" , "Fnc") +BUILTIN(__builtin_log10l, "LdLd", "Fnc") +BUILTIN(__builtin_logf, "ff" , "Fnc") +BUILTIN(__builtin_logl, "LdLd", "Fnc") +BUILTIN(__builtin_sin , "dd" , "Fnc") +BUILTIN(__builtin_sinf, "ff" , "Fnc") +BUILTIN(__builtin_sinh , "dd" , "Fnc") +BUILTIN(__builtin_sinhf, "ff" , "Fnc") +BUILTIN(__builtin_sinhl, "LdLd", "Fnc") +BUILTIN(__builtin_sinl, "LdLd", "Fnc") +BUILTIN(__builtin_sqrt , "dd" , "Fnc") +BUILTIN(__builtin_sqrtf, "ff" , "Fnc") +BUILTIN(__builtin_sqrtl, "LdLd", "Fnc") +BUILTIN(__builtin_tan , "dd" , "Fnc") +BUILTIN(__builtin_tanf, "ff" , "Fnc") +BUILTIN(__builtin_tanh , "dd" , "Fnc") +BUILTIN(__builtin_tanhf, "ff" , "Fnc") +BUILTIN(__builtin_tanhl, "LdLd", "Fnc") +BUILTIN(__builtin_tanl, "LdLd", "Fnc") // C99 complex builtins BUILTIN(__builtin_cabs, "dXd", "Fnc") diff --git a/test/CodeGen/exprs.c b/test/CodeGen/exprs.c index a0e5b7644a..c1a5995dfc 100644 --- a/test/CodeGen/exprs.c +++ b/test/CodeGen/exprs.c @@ -116,3 +116,6 @@ void f9(struct S *x) { foo(((void)1, x->c).tab[0]); } +void f10() { + __builtin_sin(0); +}