Title: [228846] trunk/Source/WTF
Revision
228846
Author
[email protected]
Date
2018-02-20 15:11:32 -0800 (Tue, 20 Feb 2018)

Log Message

Always inline soft linking functions to work around a clang bug
https://bugs.webkit.org/show_bug.cgi?id=182985
<rdar://problem/37587017>

Reviewed by Dan Bernstein.

* wtf/cocoa/SoftLinking.h:
In some cases, clang will emit a weak extern symbol for a re-declared
symbol that has availability attributes on it. To avoid this, always
inline to avoid emitting a second symbol.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (228845 => 228846)


--- trunk/Source/WTF/ChangeLog	2018-02-20 23:02:01 UTC (rev 228845)
+++ trunk/Source/WTF/ChangeLog	2018-02-20 23:11:32 UTC (rev 228846)
@@ -1,3 +1,16 @@
+2018-02-20  Tim Horton  <[email protected]>
+
+        Always inline soft linking functions to work around a clang bug
+        https://bugs.webkit.org/show_bug.cgi?id=182985
+        <rdar://problem/37587017>
+
+        Reviewed by Dan Bernstein.
+
+        * wtf/cocoa/SoftLinking.h:
+        In some cases, clang will emit a weak extern symbol for a re-declared
+        symbol that has availability attributes on it. To avoid this, always
+        inline to avoid emitting a second symbol.
+
 2018-02-16  Dean Jackson  <[email protected]>
 
         Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa

Modified: trunk/Source/WTF/wtf/cocoa/SoftLinking.h (228845 => 228846)


--- trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2018-02-20 23:02:01 UTC (rev 228845)
+++ trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2018-02-20 23:11:32 UTC (rev 228846)
@@ -115,7 +115,7 @@
         return softLink##functionName parameterNames; \
     } \
     \
-    inline resultType functionName parameterDeclarations \
+    inline __attribute__((__always_inline__)) resultType functionName parameterDeclarations \
     { \
         return softLink##functionName parameterNames; \
     }
@@ -139,7 +139,7 @@
         return loaded; \
     } \
     \
-    __attribute__((visibility("hidden"))) resultType functionName parameterDeclarations \
+    inline __attribute__((__always_inline__)) __attribute__((visibility("hidden"))) resultType functionName parameterDeclarations \
     { \
         ASSERT(softLink##functionName); \
         return softLink##functionName parameterNames; \
@@ -477,7 +477,7 @@
         return softLink##framework##functionName parameterNames; \
     } \
     } \
-    ALWAYS_INLINE resultType functionName parameterDeclarations \
+    inline __attribute__((__always_inline__)) resultType functionName parameterDeclarations \
     {\
         return functionNamespace::softLink##framework##functionName parameterNames; \
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to