summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-01-18 22:19:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-01-18 22:19:25 +0000
commit4c01bb7a1fc5ea65e39a63593d96fa3ef5aaeed4 (patch)
tree3a3000eaeddf6b66397b7e6612ff1ce22fa740b6 /lib
parente136da97a5700d25a2d23aa90ed714129b84fcdf (diff)
Unbreak symbol mangling in .s files, at least for Darwin/Linux.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/assembly.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/assembly.h b/lib/assembly.h
index fda09c293..e6b84108f 100644
--- a/lib/assembly.h
+++ b/lib/assembly.h
@@ -16,18 +16,18 @@
#ifndef COMPILERRT_ASSEMBLY_H
#define COMPILERRT_ASSEMBLY_H
-// Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use
-// USER_LABEL_PREFIX directly because of cpp brokenness.
#if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__)
-
-#define SYMBOL_NAME(name) name
#define SEPARATOR @
-
#else
-
-#define SYMBOL_NAME(name) #__USER_LABEL_PREFIX__ ##name
#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
+#else
+#define SYMBOL_NAME(name) name
#endif
#define DEFINE_COMPILERRT_FUNCTION(name) \