diff mbox

[GOOGLE] Fix -femit-function-names in LIPO profile-use mode

Message ID CAAe5K+U2dRPhMR-MbbqRzNGyjR2kEQ6wvSDy6WE+JvnpKvuaCQ@mail.gmail.com
State New
Headers show

Commit Message

Teresa Johnson June 24, 2014, 12:50 p.m. UTC
Emit the proper module name in LIPO profile-use mode.

Passes regression tests, ok for google branches?

Thanks,
Teresa

2014-06-24  Teresa Johnson  <tejohnson@google.com>

        * coverage.c (emit_function_name): Emit module name in LIPO mode.

Comments

Xinliang David Li June 24, 2014, 3:32 p.m. UTC | #1
ok.

David

On Tue, Jun 24, 2014 at 5:50 AM, Teresa Johnson <tejohnson@google.com> wrote:
> Emit the proper module name in LIPO profile-use mode.
>
> Passes regression tests, ok for google branches?
>
> Thanks,
> Teresa
>
> 2014-06-24  Teresa Johnson  <tejohnson@google.com>
>
>         * coverage.c (emit_function_name): Emit module name in LIPO mode.
>
> Index: coverage.c
> ===================================================================
> --- coverage.c  (revision 211893)
> +++ coverage.c  (working copy)
> @@ -1882,7 +1882,9 @@ void
>  emit_function_name (void)
>  {
>    fprintf (stderr, "Module %s FuncId %u Name %s\n",
> -           main_input_file_name,
> +           (L_IPO_COMP_MODE
> +            ? get_module_name (FUNC_DECL_MODULE_ID (cfun))
> +            : main_input_file_name),
>             FUNC_DECL_FUNC_ID (cfun),
>             IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)));
>  }
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
diff mbox

Patch

Index: coverage.c
===================================================================
--- coverage.c  (revision 211893)
+++ coverage.c  (working copy)
@@ -1882,7 +1882,9 @@  void
 emit_function_name (void)
 {
   fprintf (stderr, "Module %s FuncId %u Name %s\n",
-           main_input_file_name,
+           (L_IPO_COMP_MODE
+            ? get_module_name (FUNC_DECL_MODULE_ID (cfun))
+            : main_input_file_name),
            FUNC_DECL_FUNC_ID (cfun),
            IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)));
 }