]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
winnt-cxx.c (i386_pe_type_dllexport_p): Don't dll-export inline-functions.
authorKai Tietz <ktietz@gcc.gnu.org>
Fri, 13 Sep 2013 06:43:17 +0000 (08:43 +0200)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 13 Sep 2013 06:43:17 +0000 (08:43 +0200)
2013-09-13  Kai Tietz  <ktietz@redhat.com>

* config/i386/winnt-cxx.c (i386_pe_type_dllexport_p): Don't
dll-export inline-functions.
* config/i386/winnt.c (i386_pe_determine_dllexport_p): Likewise.

Additional fix ChangeLog-date of prior commit.

From-SVN: r202555

gcc/ChangeLog
gcc/config/i386/winnt-cxx.c
gcc/config/i386/winnt.c

index f47901521355cc85fb2a3ec983683133b490e661..65170206a285ca71c0878f325d1ce9c0229e966b 100644 (file)
@@ -1,4 +1,11 @@
-2013-09-10  Jeff Law  <law@redhat.com>
+2013-09-13  Kai Tietz  <ktietz@redhat.com>
+
+       * config/i386/winnt-cxx.c (i386_pe_type_dllexport_p): Don't
+       dll-export inline-functions.
+       * config/i386/winnt.c (i386_pe_determine_dllexport_p): Likewise.
+
+
+2013-09-13  Jeff Law  <law@redhat.com>
 
        PR middle-end/58387
        Revert:
index 323844afe41ce67f6c4b2afff71cc9a1d4ea5324..92de46abd59ab2dd5c143be9b012593e3722cb58 100644 (file)
@@ -65,6 +65,13 @@ i386_pe_type_dllexport_p (tree decl)
   if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
       && DECL_ARTIFICIAL (decl) && !DECL_THUNK_P (decl))
     return false;
+  if (TREE_CODE (decl) == FUNCTION_DECL
+      && DECL_DECLARED_INLINE_P (decl))
+    {
+      if (DECL_REALLY_EXTERN (decl)
+         || !flag_keep_inline_dllexport)
+       return false;
+    }
   return true;
 }
 
index c9e3aa98a377a62b650b454128e91420599fde3e..8cf6b3c527af103e659530b03e5d9173e719b3a5 100644 (file)
@@ -110,6 +110,11 @@ i386_pe_determine_dllexport_p (tree decl)
   if (!TREE_PUBLIC (decl))
     return false;
 
+  if (TREE_CODE (decl) == FUNCTION_DECL
+      && DECL_DECLARED_INLINE_P (decl)
+      && !flag_keep_inline_dllexport)
+    return false; 
+
   if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
     return true;