aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorerichkeane <ekeane@nvidia.com>2025-01-09 07:15:05 -0800
committererichkeane <ekeane@nvidia.com>2025-01-09 09:28:58 -0800
commitbe32621ce8cbffe674c62e87c0c51c9fc4a21e5f (patch)
treee78e02ac344495daf321899a8ca4595e69b16927 /clang/lib/Serialization/ASTWriter.cpp
parentf8f8598fd886cddfd374fa43eb6d7d37d301b576 (diff)
downloadllvm-be32621ce8cbffe674c62e87c0c51c9fc4a21e5f.zip
llvm-be32621ce8cbffe674c62e87c0c51c9fc4a21e5f.tar.gz
llvm-be32621ce8cbffe674c62e87c0c51c9fc4a21e5f.tar.bz2
[OpenACC] Implement 'device' and 'host' clauses for 'update'
These two clauses just take a 'var-list' and specify where the variables should be copied from/to. This patch implements the AST nodes for them and ensures they properly take a var-list.
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 8d9396e..39004fd 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -8371,6 +8371,18 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
writeOpenACCVarList(PC);
return;
}
+ case OpenACCClauseKind::Host: {
+ const auto *HC = cast<OpenACCHostClause>(C);
+ writeSourceLocation(HC->getLParenLoc());
+ writeOpenACCVarList(HC);
+ return;
+ }
+ case OpenACCClauseKind::Device: {
+ const auto *DC = cast<OpenACCDeviceClause>(C);
+ writeSourceLocation(DC->getLParenLoc());
+ writeOpenACCVarList(DC);
+ return;
+ }
case OpenACCClauseKind::FirstPrivate: {
const auto *FPC = cast<OpenACCFirstPrivateClause>(C);
writeSourceLocation(FPC->getLParenLoc());
@@ -8544,9 +8556,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
}
case OpenACCClauseKind::NoHost:
- case OpenACCClauseKind::Device:
case OpenACCClauseKind::DeviceResident:
- case OpenACCClauseKind::Host:
case OpenACCClauseKind::Link:
case OpenACCClauseKind::Bind:
case OpenACCClauseKind::Invalid: