[PATCH] D49914: [libc++] Add the _LIBCPP_HIDE_FROM_ABI_AFTER_V1 macro
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 27 09:27:26 PDT 2018
dexonsmith added a comment.
This looks correct to me, but I wouldn't mind having someone else take a look too.
================
Comment at: libcxx/include/__config:798
-// Just so we can migrate to _LIBCPP_HIDE_FROM_ABI gradually.
-#define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
-
-#ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
-# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
-# define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__visibility__("default"), __always_inline__))
+#ifdef _LIBCPP_BUILDING_LIBRARY
+# if _LIBCPP_ABI_VERSION > 1
----------------
It looks like if you switch this to `#if !defined(...)` you can use `#elif` instead of a nested `#if`. I think that would make the logic a bit more clear for me, but if you disagree feel free to leave it as is.
Repository:
rCXX libc++
https://reviews.llvm.org/D49914
More information about the cfe-commits
mailing list