aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorerichkeane <ekeane@nvidia.com>2024-12-19 06:11:36 -0800
committererichkeane <ekeane@nvidia.com>2024-12-19 12:21:50 -0800
commit4bbdb018a6cb564783cfb9c65ca82b81c6006bb6 (patch)
tree8840c290fc90202041b8da04eb9dd9f665ecf064 /clang/lib/Serialization/ASTWriterStmt.cpp
parent10d054e95413f0e98e4aeed9dbd4605f6f03b3fa (diff)
downloadllvm-4bbdb018a6cb564783cfb9c65ca82b81c6006bb6.zip
llvm-4bbdb018a6cb564783cfb9c65ca82b81c6006bb6.tar.gz
llvm-4bbdb018a6cb564783cfb9c65ca82b81c6006bb6.tar.bz2
[OpenACC] Implement 'init' and 'shutdown' constructs
These two constructs are very simple and similar, and only support 3 different clauses, two of which are already implemented. This patch adds AST nodes for both constructs, and leaves the device_num clause unimplemented, but enables the other two.
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index f13443d..1d42b43 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -2945,6 +2945,18 @@ void ASTStmtWriter::VisitOpenACCExitDataConstruct(OpenACCExitDataConstruct *S) {
Code = serialization::STMT_OPENACC_EXIT_DATA_CONSTRUCT;
}
+void ASTStmtWriter::VisitOpenACCInitConstruct(OpenACCInitConstruct *S) {
+ VisitStmt(S);
+ VisitOpenACCConstructStmt(S);
+ Code = serialization::STMT_OPENACC_INIT_CONSTRUCT;
+}
+
+void ASTStmtWriter::VisitOpenACCShutdownConstruct(OpenACCShutdownConstruct *S) {
+ VisitStmt(S);
+ VisitOpenACCConstructStmt(S);
+ Code = serialization::STMT_OPENACC_SHUTDOWN_CONSTRUCT;
+}
+
void ASTStmtWriter::VisitOpenACCHostDataConstruct(OpenACCHostDataConstruct *S) {
VisitStmt(S);
VisitOpenACCAssociatedStmtConstruct(S);