[libcxx] r297330 - [libc++] Avoid double defining macro on Windows

Shoaib Meenai via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 16:18:01 PST 2017


Author: smeenai
Date: Wed Mar  8 18:18:00 2017
New Revision: 297330

URL: http://llvm.org/viewvc/llvm-project?rev=297330&view=rev
Log:
[libc++] Avoid double defining macro on Windows

Put proper guards around _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS.
No functional change on non-Windows. Avoids incorrect macro redefinition
on Windows.

Modified:
    libcxx/trunk/include/__config

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=297330&r1=297329&r2=297330&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Wed Mar  8 18:18:00 2017
@@ -615,8 +615,14 @@ namespace std {
 #endif
 #endif
 
+#ifndef _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+#if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
 // The inline should be removed once PR32114 is resolved
 #define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCPP_HIDDEN
+#else
+#define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+#endif
+#endif
 
 #ifndef _LIBCPP_FUNC_VIS
 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)




More information about the cfe-commits mailing list