[llvm-commits] [compiler-rt] r93789 - /compiler-rt/trunk/lib/assembly.h
Daniel Dunbar
daniel at zuster.org
Mon Jan 18 14:19:25 PST 2010
Author: ddunbar
Date: Mon Jan 18 16:19:25 2010
New Revision: 93789
URL: http://llvm.org/viewvc/llvm-project?rev=93789&view=rev
Log:
Unbreak symbol mangling in .s files, at least for Darwin/Linux.
Modified:
compiler-rt/trunk/lib/assembly.h
Modified: compiler-rt/trunk/lib/assembly.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/assembly.h?rev=93789&r1=93788&r2=93789&view=diff
==============================================================================
--- compiler-rt/trunk/lib/assembly.h (original)
+++ compiler-rt/trunk/lib/assembly.h Mon Jan 18 16:19:25 2010
@@ -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) \
More information about the llvm-commits
mailing list