summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2011-04-19 21:22:14 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2011-04-19 21:22:14 +0000
commit3c5199042a1206d11eb062c142c13aedd96c108e (patch)
tree3d771fcd82973067bfa87224b8c0fc80d828d03a /compiler-rt
parent2b9b0e3748def043c0e4b1bc62e61a48133d4dd4 (diff)
downloadbcm5719-llvm-3c5199042a1206d11eb062c142c13aedd96c108e.tar.gz
bcm5719-llvm-3c5199042a1206d11eb062c142c13aedd96c108e.zip
Add some macro magic: user __USER_LABEL_PREFIX__ instead of hardcoding it for each platform
llvm-svn: 129818
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/assembly.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/assembly.h b/compiler-rt/lib/assembly.h
index 245f96d88bb..0ce83ac294c 100644
--- a/compiler-rt/lib/assembly.h
+++ b/compiler-rt/lib/assembly.h
@@ -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 \
OpenPOWER on IntegriCloud