diff mbox

[cp] : Check for keep-inline-dllexport that we are operating on true inlines

Message ID CAEwic4bN2kQ9wDTOa3F_ZEWBgqUfU+AE2Uiz_0qqc7uohXoJbg@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Aug. 4, 2014, 11:09 a.m. UTC
Hi,

This patch makes sure that we check for flag keep-inline-dllexport
that we operate on true inlines as we do it for keep-inline-functions.

ChangeLog

2014-08-04  Kai Tietz  <ktietz@redhat.com>

    * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
    that we operate on a true inline.

Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
Ok for apply?

Regards,
Kai

Comments

Jason Merrill Aug. 4, 2014, 7:37 p.m. UTC | #1
OK.

Jason
diff mbox

Patch

Index: semantics.c
===================================================================
--- semantics.c (Revision 213543)
+++ semantics.c (Arbeitskopie)
@@ -4001,11 +4001,11 @@  expand_or_defer_fn_1 (tree fn)
         this function as needed so that finish_file will make sure to
         output it later.  Similarly, all dllexport'd functions must
         be emitted; there may be callers in other DLLs.  */
-      if ((flag_keep_inline_functions
-          && DECL_DECLARED_INLINE_P (fn)
-          && !DECL_REALLY_EXTERN (fn))
-         || (flag_keep_inline_dllexport
-             && lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn))))
+      if (DECL_DECLARED_INLINE_P (fn)
+         && !DECL_REALLY_EXTERN (fn)
+         && (flag_keep_inline_functions
+             || (flag_keep_inline_dllexport
+                 && lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn)))))
        {
          mark_needed (fn);
          DECL_EXTERNAL (fn) = 0;