Add support for 'dynamic_allocators' clause on 'requires' directive. Differential Revision: https://reviews.llvm.org/D53079
llvm-svn: 344249
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index de78a1a..d9f2973 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -8013,6 +8013,7 @@
case OMPC_unified_address:
case OMPC_unified_shared_memory:
case OMPC_reverse_offload:
+ case OMPC_dynamic_allocators:
llvm_unreachable("Clause is not allowed.");
}
return Res;
@@ -8537,6 +8538,7 @@
case OMPC_unified_address:
case OMPC_unified_shared_memory:
case OMPC_reverse_offload:
+ case OMPC_dynamic_allocators:
llvm_unreachable("Unexpected OpenMP clause.");
}
return CaptureRegion;
@@ -8857,6 +8859,7 @@
case OMPC_unified_address:
case OMPC_unified_shared_memory:
case OMPC_reverse_offload:
+ case OMPC_dynamic_allocators:
llvm_unreachable("Clause is not allowed.");
}
return Res;
@@ -9016,6 +9019,7 @@
case OMPC_unified_address:
case OMPC_unified_shared_memory:
case OMPC_reverse_offload:
+ case OMPC_dynamic_allocators:
llvm_unreachable("Clause is not allowed.");
}
return Res;
@@ -9180,6 +9184,9 @@
case OMPC_reverse_offload:
Res = ActOnOpenMPReverseOffloadClause(StartLoc, EndLoc);
break;
+ case OMPC_dynamic_allocators:
+ Res = ActOnOpenMPDynamicAllocatorsClause(StartLoc, EndLoc);
+ break;
case OMPC_if:
case OMPC_final:
case OMPC_num_threads:
@@ -9295,6 +9302,11 @@
return new (Context) OMPReverseOffloadClause(StartLoc, EndLoc);
}
+OMPClause *Sema::ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc,
+ SourceLocation EndLoc) {
+ return new (Context) OMPDynamicAllocatorsClause(StartLoc, EndLoc);
+}
+
OMPClause *Sema::ActOnOpenMPVarListClause(
OpenMPClauseKind Kind, ArrayRef<Expr *> VarList, Expr *TailExpr,
SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc,
@@ -9405,6 +9417,7 @@
case OMPC_unified_address:
case OMPC_unified_shared_memory:
case OMPC_reverse_offload:
+ case OMPC_dynamic_allocators:
llvm_unreachable("Clause is not allowed.");
}
return Res;