From 18772de1ecb1a23b483e29987ae708ab641b1134 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Mon, 26 Apr 2021 09:46:11 +0100 Subject: [PATCH] [OpenCL] Add inc/dec/cmpxchg C++ legacy atomics with generic Mirror the remaining C++ for OpenCL specific builtins from opencl-c.h to the TableGen builtin functions. Fixes PR50041 (part 2). --- clang/lib/Sema/OpenCLBuiltins.td | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clang/lib/Sema/OpenCLBuiltins.td b/clang/lib/Sema/OpenCLBuiltins.td index eb8034e..efb540c 100644 --- a/clang/lib/Sema/OpenCLBuiltins.td +++ b/clang/lib/Sema/OpenCLBuiltins.td @@ -1088,6 +1088,12 @@ let Extension = FuncExtOpenCLCxx in { "atomic_or", "atomic_xor"] in { def : Builtin, GenericAS>, Type]>; } + foreach name = ["atomic_inc", "atomic_dec"] in { + def : Builtin, GenericAS>]>; + } + foreach name = ["atomic_cmpxchg"] in { + def : Builtin, GenericAS>, Type, Type]>; + } } } -- 2.7.4