Author: rakete1111
Date: Fri Apr 12 11:34:19 2019
New Revision: 358301

URL: http://llvm.org/viewvc/llvm-project?rev=358301&view=rev
Log:
[NFC] Move the export attribute after extern "C".

Not all compilers support attributes before `extern "C"`. gcc is the main one
that doesn't support it.

Modified:
    libunwind/trunk/src/config.h

Modified: libunwind/trunk/src/config.h
URL: 
http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/config.h?rev=358301&r1=358300&r2=358301&view=diff
==============================================================================
--- libunwind/trunk/src/config.h (original)
+++ libunwind/trunk/src/config.h Fri Apr 12 11:34:19 2019
@@ -70,23 +70,22 @@
 #define _LIBUNWIND_WEAK_ALIAS(name, aliasname)                                 
\
   __asm__(".globl " SYMBOL_NAME(aliasname));                                   
\
   __asm__(SYMBOL_NAME(aliasname) " = " SYMBOL_NAME(name));                     
\
-  _LIBUNWIND_EXPORT                                                            
\
-  extern "C" __typeof(name) aliasname __attribute__((weak_import));
+  extern "C" _LIBUNWIND_EXPORT __typeof(name) aliasname                        
\
+      __attribute__((weak_import));
 #elif defined(__ELF__)
 #define _LIBUNWIND_WEAK_ALIAS(name, aliasname)                                 
\
-  _LIBUNWIND_EXPORT                                                            
\
-  extern "C" __typeof(name) aliasname __attribute__((weak, alias(#name)));
+  extern "C" _LIBUNWIND_EXPORT __typeof(name) aliasname                        
\
+      __attribute__((weak, alias(#name)));
 #elif defined(_WIN32)
 #if defined(__MINGW32__)
 #define _LIBUNWIND_WEAK_ALIAS(name, aliasname)                                 
\
-  _LIBUNWIND_EXPORT                                                            
\
-  extern "C" __typeof(name) aliasname __attribute__((alias(#name)));
+  extern "C" _LIBUNWIND_EXPORT __typeof(name) aliasname                        
\
+      __attribute__((alias(#name)));
 #else
 #define _LIBUNWIND_WEAK_ALIAS(name, aliasname)                                 
\
   __pragma(comment(linker, "/alternatename:" SYMBOL_NAME(aliasname) "="        
\
                                              SYMBOL_NAME(name)))               
\
-  _LIBUNWIND_EXPORT \
-  extern "C" __typeof(name) aliasname;
+  extern "C" _LIBUNWIND_EXPORT __typeof(name) aliasname;
 #endif
 #else
 #error Unsupported target


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to