[compiler-rt] r359865 - Avoid duplicate function aliases on MinGW after SVN r359835

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 00:43:23 PDT 2019


Author: mstorsjo
Date: Fri May  3 00:43:23 2019
New Revision: 359865

URL: http://llvm.org/viewvc/llvm-project?rev=359865&view=rev
Log:
Avoid duplicate function aliases on MinGW after SVN r359835

On MinGW, the same alias mechanism as for ELF, using
__attribute__((__alias__())), is used.

Modified:
    compiler-rt/trunk/lib/builtins/comparedf2.c
    compiler-rt/trunk/lib/builtins/comparesf2.c

Modified: compiler-rt/trunk/lib/builtins/comparedf2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/comparedf2.c?rev=359865&r1=359864&r2=359865&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/comparedf2.c (original)
+++ compiler-rt/trunk/lib/builtins/comparedf2.c Fri May  3 00:43:23 2019
@@ -141,8 +141,9 @@ COMPILER_RT_ALIAS(__unorddf2, __aeabi_dc
 #endif
 #endif
 
-#if defined(_WIN32)
-// The alias mechanism doesn't work on Windows, so emit wrapper functions.
+#if defined(_WIN32) && !defined(__MINGW32__)
+// The alias mechanism doesn't work on Windows except for MinGW, so emit
+// wrapper functions.
 int __eqdf2(fp_t a, fp_t b) { return __ledf2(a, b); }
 int __ltdf2(fp_t a, fp_t b) { return __ledf2(a, b); }
 int __nedf2(fp_t a, fp_t b) { return __ledf2(a, b); }

Modified: compiler-rt/trunk/lib/builtins/comparesf2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/comparesf2.c?rev=359865&r1=359864&r2=359865&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/comparesf2.c (original)
+++ compiler-rt/trunk/lib/builtins/comparesf2.c Fri May  3 00:43:23 2019
@@ -141,8 +141,9 @@ COMPILER_RT_ALIAS(__unordsf2, __aeabi_fc
 #endif
 #endif
 
-#if defined(_WIN32)
-// The alias mechanism doesn't work on Windows, so emit wrapper functions.
+#if defined(_WIN32) && !defined(__MINGW32__)
+// The alias mechanism doesn't work on Windows except for MinGW, so emit
+// wrapper functions.
 int __eqsf2(fp_t a, fp_t b) { return __lesf2(a, b); }
 int __ltsf2(fp_t a, fp_t b) { return __lesf2(a, b); }
 int __nesf2(fp_t a, fp_t b) { return __lesf2(a, b); }




More information about the llvm-commits mailing list