[PATCH] D95639: [compiler-rt] Fix AArch64 out-of-line atomics visibility on mach-o

Erik Pilkington via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 14:08:27 PST 2021


erik.pilkington created this revision.
erik.pilkington added reviewers: ilinpv, arphaman.
Herald added subscribers: danielkiss, ributzka, jkorous, kristof.beyls, dberris.
erik.pilkington requested review of this revision.

This fixes an apparent oversight in D91156 <https://reviews.llvm.org/D91156>, where the symbol was defined without the leading underscore, then the visibility was later declared with it. rdar://73364185


https://reviews.llvm.org/D95639

Files:
  compiler-rt/lib/builtins/assembly.h


Index: compiler-rt/lib/builtins/assembly.h
===================================================================
--- compiler-rt/lib/builtins/assembly.h
+++ compiler-rt/lib/builtins/assembly.h
@@ -204,8 +204,11 @@
 #ifdef VISIBILITY_HIDDEN
 #define DECLARE_SYMBOL_VISIBILITY(name)                                        \
   HIDDEN(SYMBOL_NAME(name)) SEPARATOR
+#define DECLARE_SYMBOL_VISIBILITY_UNMANGLED(name) \
+  HIDDEN(name) SEPARATOR
 #else
 #define DECLARE_SYMBOL_VISIBILITY(name)
+#define DECLARE_SYMBOL_VISIBILITY_UNMANGLED(name)
 #endif
 
 #define DEFINE_COMPILERRT_FUNCTION(name)                                       \
@@ -248,7 +251,7 @@
   FUNC_ALIGN                                                                   \
   .globl name SEPARATOR                                                        \
   SYMBOL_IS_FUNC(name) SEPARATOR                                               \
-  DECLARE_SYMBOL_VISIBILITY(name) SEPARATOR                                    \
+  DECLARE_SYMBOL_VISIBILITY_UNMANGLED(name) SEPARATOR                          \
   CFI_START SEPARATOR                                                          \
   DECLARE_FUNC_ENCODING                                                        \
   name: SEPARATOR BTI_C


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95639.319958.patch
Type: text/x-patch
Size: 1248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210128/edf72fed/attachment.bin>


More information about the llvm-commits mailing list