Add support for unified_shared_memory clause on requires directive
llvm-svn: 343472
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 75351eb..fec8f8b 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -8011,6 +8011,7 @@
case OMPC_use_device_ptr:
case OMPC_is_device_ptr:
case OMPC_unified_address:
+ case OMPC_unified_shared_memory:
llvm_unreachable("Clause is not allowed.");
}
return Res;
@@ -8533,6 +8534,7 @@
case OMPC_use_device_ptr:
case OMPC_is_device_ptr:
case OMPC_unified_address:
+ case OMPC_unified_shared_memory:
llvm_unreachable("Unexpected OpenMP clause.");
}
return CaptureRegion;
@@ -8851,6 +8853,7 @@
case OMPC_use_device_ptr:
case OMPC_is_device_ptr:
case OMPC_unified_address:
+ case OMPC_unified_shared_memory:
llvm_unreachable("Clause is not allowed.");
}
return Res;
@@ -9008,6 +9011,7 @@
case OMPC_use_device_ptr:
case OMPC_is_device_ptr:
case OMPC_unified_address:
+ case OMPC_unified_shared_memory:
llvm_unreachable("Clause is not allowed.");
}
return Res;
@@ -9166,6 +9170,9 @@
case OMPC_unified_address:
Res = ActOnOpenMPUnifiedAddressClause(StartLoc, EndLoc);
break;
+ case OMPC_unified_shared_memory:
+ Res = ActOnOpenMPUnifiedSharedMemoryClause(StartLoc, EndLoc);
+ break;
case OMPC_if:
case OMPC_final:
case OMPC_num_threads:
@@ -9271,6 +9278,11 @@
return new (Context) OMPUnifiedAddressClause(StartLoc, EndLoc);
}
+OMPClause *Sema::ActOnOpenMPUnifiedSharedMemoryClause(SourceLocation StartLoc,
+ SourceLocation EndLoc) {
+ return new (Context) OMPUnifiedSharedMemoryClause(StartLoc, EndLoc);
+}
+
OMPClause *Sema::ActOnOpenMPVarListClause(
OpenMPClauseKind Kind, ArrayRef<Expr *> VarList, Expr *TailExpr,
SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc,
@@ -9379,6 +9391,7 @@
case OMPC_unknown:
case OMPC_uniform:
case OMPC_unified_address:
+ case OMPC_unified_shared_memory:
llvm_unreachable("Clause is not allowed.");
}
return Res;