forked from OSchip/llvm-project
Add some macro magic: user __USER_LABEL_PREFIX__ instead of hardcoding it for each platform
llvm-svn: 129818
This commit is contained in:
parent
2b9b0e3748
commit
3c5199042a
|
@ -22,18 +22,18 @@
|
|||
#define SEPARATOR ;
|
||||
#endif
|
||||
|
||||
/* We can't use __USER_LABEL_PREFIX__ here, it isn't possible to concatenate the
|
||||
*values* of two macros. This is quite brittle, though. */
|
||||
#if defined(__APPLE__)
|
||||
#define SYMBOL_NAME(name) _##name
|
||||
#define HIDDEN_DIRECTIVE .private_extern
|
||||
#define LOCAL_LABEL(name) L_##name
|
||||
#else
|
||||
#define SYMBOL_NAME(name) name
|
||||
#define HIDDEN_DIRECTIVE .hidden
|
||||
#define LOCAL_LABEL(name) .L_##name
|
||||
#endif
|
||||
|
||||
#define GLUE2(a, b) a ## b
|
||||
#define GLUE(a, b) GLUE2(a, b)
|
||||
#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
|
||||
|
||||
#ifdef VISIBILITY_HIDDEN
|
||||
#define DEFINE_COMPILERRT_FUNCTION(name) \
|
||||
.globl SYMBOL_NAME(name) SEPARATOR \
|
||||
|
|
Loading…
Reference in New Issue