[PATCH] D17950: Implement is_always_lock_free

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 16:48:40 PDT 2016


On Mon, Mar 21, 2016 at 4:46 PM, JF Bastien via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> jfb added inline comments.
>
> ================
> Comment at: lib/Frontend/InitPreprocessor.cpp:465
> @@ +464,3 @@
> +  if (LangOpts.CPlusPlus1z) {
> +    Builder.defineMacro("__cpp_lib_atomic_is_always_lock_free", "201603");
> +  }
> ----------------
> rsmith wrote:
>> This should be defined by the relevant library header, not by the compiler, to indicate the library actually provides the new symbol.
> Ah yes, makes sense. Looks like libc++ doesn't do this for other library features yet so I'll add it there.
>
> This patch would then just fix test/Lexer/cxx-features.cpp for C++17 support and have nothing to do with `is_always_lock_free`. It's probably better if I close this patch and open a new one in that case.

Feel free to commit that portion of the change.


More information about the cfe-commits mailing list