diff options
author | Richard Henderson <rth@redhat.com> | 2001-09-21 13:42:14 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-09-21 13:42:14 -0700 |
commit | ee1315aa922e5c7baef0b2d288be0ead90f547e7 (patch) | |
tree | d19867fbccbbeb6e48319d84fbc1d2e273b6f322 | |
parent | 9defc9b7ac96fd51c70aff0e452c753d1f6159b3 (diff) | |
download | gcc-ee1315aa922e5c7baef0b2d288be0ead90f547e7.zip gcc-ee1315aa922e5c7baef0b2d288be0ead90f547e7.tar.gz gcc-ee1315aa922e5c7baef0b2d288be0ead90f547e7.tar.bz2 |
optabs.c (init_one_libfunc): Gen a FUNCTION_DECL for use by ENCODE_SECTION_INFO...
* optabs.c (init_one_libfunc): Gen a FUNCTION_DECL for use by
ENCODE_SECTION_INFO; get SYMBOL_REF from make_decl_rtl.
From-SVN: r45737
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/optabs.c | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 414effb..69bc75f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2001-09-21 Richard Henderson <rth@redhat.com> + * optabs.c (init_one_libfunc): Gen a FUNCTION_DECL for use by + ENCODE_SECTION_INFO; get SYMBOL_REF from make_decl_rtl. + +2001-09-21 Richard Henderson <rth@redhat.com> + * rtl.h (LCT_RETURNS_TWICE): New. * calls.c (emit_call_1): Set current_function_calls_setjmp for ECF_RETURNS_TWICE. diff --git a/gcc/optabs.c b/gcc/optabs.c index 7957719..6421adf 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -4687,9 +4687,17 @@ rtx init_one_libfunc (name) register const char *name; { - name = ggc_strdup (name); - - return gen_rtx_SYMBOL_REF (Pmode, name); + /* Create a FUNCTION_DECL that can be passed to ENCODE_SECTION_INFO. */ + /* ??? We don't have any type information except for this is + a function. See if error_mark_node is good enough. */ + tree decl = build_decl (FUNCTION_DECL, get_identifier (name), + error_mark_node); + DECL_ARTIFICIAL (decl) = 1; + DECL_EXTERNAL (decl) = 1; + TREE_PUBLIC (decl) = 1; + + /* Return the symbol_ref from the mem rtx. */ + return XEXP (DECL_RTL (decl), 0); } /* Mark ARG (which is really an OPTAB *) for GC. */ |