[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

Sunil K via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 00:24:50 PST 2023


koops updated this revision to Diff 558051.
koops added a comment.

To avoid build error in ppc64 adding a "default" to switch statement. This is similar to the way it is currently handled in

   OMPClauseWithPreInit::get() {
  switch(C->getClauseKind()) {
  case ...
  ....
  default:
  } 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123235/new/

https://reviews.llvm.org/D123235

Files:
  clang/lib/Basic/OpenMPKinds.cpp


Index: clang/lib/Basic/OpenMPKinds.cpp
===================================================================
--- clang/lib/Basic/OpenMPKinds.cpp
+++ clang/lib/Basic/OpenMPKinds.cpp
@@ -442,12 +442,13 @@
   case OMPC_fail: {
     OpenMPClauseKind CK = static_cast<OpenMPClauseKind>(Type);
     switch (CK) {
-    case OMPC_unknown:
-      return "unknown";
 #define OPENMP_ATOMIC_FAIL_MODIFIER(Name)                                      \
   case OMPC_##Name:                                                            \
     return #Name;
 #include "clang/Basic/OpenMPKinds.def"
+    case OMPC_unknown:
+    default:
+      return "unknown";
     }
     llvm_unreachable("Invalid OpenMP 'fail' clause modifier");
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123235.558051.patch
Type: text/x-patch
Size: 716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20231108/18d4aab1/attachment.bin>


More information about the llvm-commits mailing list