diff options
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 7e829ef..034ec2e 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -8739,13 +8739,12 @@ fold_builtin_FILE (location_t loc) static inline tree fold_builtin_FUNCTION () { + const char *name = ""; + if (current_function_decl) - { - const char *name = IDENTIFIER_POINTER (DECL_NAME (current_function_decl)); - return build_string_literal (strlen (name) + 1, name); - } + name = lang_hooks.decl_printable_name (current_function_decl, 0); - return build_string_literal (1, ""); + return build_string_literal (strlen (name) + 1, name); } /* Fold a call to __builtin_LINE to an integer constant. */ |