[compiler-rt] r209094 - assembly: rework HIDDEN_DIRECTIVE to accomodate COFF
Saleem Abdulrasool
compnerd at compnerd.org
Sun May 18 11:39:10 PDT 2014
Author: compnerd
Date: Sun May 18 13:39:10 2014
New Revision: 209094
URL: http://llvm.org/viewvc/llvm-project?rev=209094&view=rev
Log:
assembly: rework HIDDEN_DIRECTIVE to accomodate COFF
Rename the HIDDEN_DIRECTIVE macro to HIDDEN and give it a parameter providing
the name of the symbol to be given hidden visibility. This makes the macros
more amenable to COFF.
Modified:
compiler-rt/trunk/lib/builtins/assembly.h
Modified: compiler-rt/trunk/lib/builtins/assembly.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/assembly.h?rev=209094&r1=209093&r2=209094&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/assembly.h (original)
+++ compiler-rt/trunk/lib/builtins/assembly.h Sun May 18 13:39:10 2014
@@ -23,13 +23,13 @@
#endif
#if defined(__APPLE__)
-#define HIDDEN_DIRECTIVE .private_extern
+#define HIDDEN(name) .private_extern name
#define LOCAL_LABEL(name) L_##name
// tell linker it can break up file at label boundaries
#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols
#define SYMBOL_IS_FUNC(name)
#else
-#define HIDDEN_DIRECTIVE .hidden
+#define HIDDEN(name) .hidden name
#define LOCAL_LABEL(name) .L_##name
#define FILE_LEVEL_DIRECTIVE
#if defined(__arm__)
@@ -90,7 +90,7 @@
#ifdef VISIBILITY_HIDDEN
#define DECLARE_SYMBOL_VISIBILITY(name) \
- HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR
+ HIDDEN(SYMBOL_NAME(name)) SEPARATOR
#else
#define DECLARE_SYMBOL_VISIBILITY(name)
#endif
@@ -106,13 +106,13 @@
FILE_LEVEL_DIRECTIVE SEPARATOR \
.globl SYMBOL_NAME(name) SEPARATOR \
SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \
- HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
+ HIDDEN(SYMBOL_NAME(name)) SEPARATOR \
SYMBOL_NAME(name):
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \
.globl name SEPARATOR \
SYMBOL_IS_FUNC(name) SEPARATOR \
- HIDDEN_DIRECTIVE name SEPARATOR \
+ HIDDEN(name) SEPARATOR \
name:
#define DEFINE_COMPILERRT_FUNCTION_ALIAS(name, target) \
More information about the llvm-commits
mailing list