Since the output here should be usable via humans, we
should print out the user realable name and not just the
mangled name. For C, that means we print out the same name
twice which is fine. The mangled name is useful to correspond
the assembly with the stack usage too.
For C++ it will something like:
t.c:2:5:_Z5unopti `int unopt(int)` 16 static
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* toplev.cc (output_stack_usage_1): Print out the human readable
name in quotes.
gcc/testsuite/ChangeLog:
* gcc.dg/stack-usage-1.c: Update testcase.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
return 0;
}
-/* { dg-final { scan-stack-usage "foo\t\(256|264\)\tstatic" } } */
+/* { dg-final { scan-stack-usage "foo `foo`\t\(256|264\)\tstatic" } } */
/* { dg-final { cleanup-stack-usage } } */
print_decl_identifier (stack_usage_file, current_function_decl,
PRINT_DECL_ORIGIN | PRINT_DECL_UNIQUE_NAME
| PRINT_DECL_REMAP_DEBUG);
+ fprintf (stack_usage_file, " `");
+ print_decl_identifier (stack_usage_file, current_function_decl,
+ PRINT_DECL_NAME);
+ fprintf (stack_usage_file, "`");
fprintf (stack_usage_file, "\t" HOST_WIDE_INT_PRINT_DEC"\t%s\n",
stack_usage, stack_usage_kind_str[stack_usage_kind]);
}