aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 116867a..b97539c 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "spellcheck.h"
#include "c-spellcheck.h"
#include "selftest.h"
+#include "debug.h"
cpp_reader *parse_in; /* Declared in c-pragma.h. */
@@ -9086,4 +9087,20 @@ braced_lists_to_strings (tree type, tree ctor)
return braced_lists_to_strings (type, ctor, false);
}
+
+/* Emit debug for functions before finalizing early debug. */
+
+void
+c_common_finalize_early_debug (void)
+{
+ /* Emit early debug for reachable functions, and by consequence,
+ locally scoped symbols. Also emit debug for extern declared
+ functions that are still reachable at this point. */
+ struct cgraph_node *cnode;
+ FOR_EACH_FUNCTION (cnode)
+ if (!cnode->alias && !cnode->thunk.thunk_p
+ && (cnode->has_gimple_body_p () || !DECL_IS_BUILTIN (cnode->decl)))
+ (*debug_hooks->early_global_decl) (cnode->decl);
+}
+
#include "gt-c-family-c-common.h"