================
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef 
Name) {
   return llvm::StringSwitch<OpenACCDirectiveKindEx>(Name)
       .Case("enter", OpenACCDirectiveKindEx::Enter)
       .Case("exit", OpenACCDirectiveKindEx::Exit)
+      .Case("atomic", OpenACCDirectiveKindEx::Atomic)
       .Default(OpenACCDirectiveKindEx::Invalid);
 }
 
+// Since 'atomic' is effectively a compound directive, this will decode the
+// second part of the directive.
+OpenACCDirectiveKind getOpenACCAtomicDirectiveKind(StringRef Name) {
+  return llvm::StringSwitch<OpenACCDirectiveKind>(Name)
+      .Case("read", OpenACCDirectiveKind::AtomicRead)
+      .Case("write", OpenACCDirectiveKind::AtomicWrite)
+      .Case("update", OpenACCDirectiveKind::AtomicUpdate)
+      .Case("capture", OpenACCDirectiveKind::AtomicCapture)
----------------
erichkeane wrote:

The list is a pretty complete set, right? These haven't changed in a very long 
time as far as I can tell, so I considered the risk of that to be minimal.

https://github.com/llvm/llvm-project/pull/73015
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to