aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2001-02-16 08:03:10 -0500
committerJason Merrill <jason@gcc.gnu.org>2001-02-16 08:03:10 -0500
commit1edf43d63f1f23b070786a1da29edbc63cdebae1 (patch)
tree5ae76ee139c95d2ba34d0cb6fa406f2f92e70519 /gcc/toplev.c
parenta901fa64045a73517d8c212740b57e8b7650f3ad (diff)
downloadgcc-1edf43d63f1f23b070786a1da29edbc63cdebae1.zip
gcc-1edf43d63f1f23b070786a1da29edbc63cdebae1.tar.gz
gcc-1edf43d63f1f23b070786a1da29edbc63cdebae1.tar.bz2
dwarf2out.c (add_bound_info): Don't crash if SAVE_EXPR_RTL is NULL.
* dwarf2out.c (add_bound_info): Don't crash if SAVE_EXPR_RTL is NULL. (gen_subprogram_die): Don't abort on seeing a second definition if the previous one was abstract. Don't replace an abstract instance in the lookup table. * dwarf2out.c (dwarf2out_abstract_function): Rename from gen_abstract_function. * dwarf2out.h: Declare it. * toplev.c (note_outlining_of_inline_function): New fn. * toplev.h: Declare it. * integrate.c (output_inline_function): Call it. * c-decl.c (duplicate_decls): Call it when redefining an extern inline. Don't inline the new defn. From-SVN: r39763
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 3818998..6a00107 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2681,6 +2681,24 @@ note_deferral_of_defined_inline_function (decl)
#endif
}
+/* FNDECL is an inline function which is about to be emitted out of line.
+ Do any preparation, such as emitting abstract debug info for the inline
+ before it gets mangled by optimization. */
+
+void
+note_outlining_of_inline_function (fndecl)
+ tree fndecl;
+{
+#ifdef DWARF2_DEBUGGING_INFO
+ /* The DWARF 2 backend tries to reduce debugging bloat by not emitting
+ the abstract description of inline functions until something tries to
+ reference them. Force it out now, before optimizations mangle the
+ block tree. */
+ if (write_symbols == DWARF2_DEBUG)
+ dwarf2out_abstract_function (fndecl);
+#endif
+}
+
/* This is called from finish_function (within yyparse)
after each top-level definition is parsed.
It is supposed to compile that function or variable