diff options
author | erichkeane <ekeane@nvidia.com> | 2025-04-03 09:09:41 -0700 |
---|---|---|
committer | erichkeane <ekeane@nvidia.com> | 2025-04-04 12:32:33 -0700 |
commit | 6263de90df7f58c8b98475024d5eef102e10a372 (patch) | |
tree | ab9eb2031f8292a8812c67789bd971b14a55253e /clang/lib/Serialization/ASTWriter.cpp | |
parent | ebb0e6cb2555186fa0417ecb54925aa659346771 (diff) | |
download | llvm-6263de90df7f58c8b98475024d5eef102e10a372.zip llvm-6263de90df7f58c8b98475024d5eef102e10a372.tar.gz llvm-6263de90df7f58c8b98475024d5eef102e10a372.tar.bz2 |
[OpenACC] Implement 'modifier-list' sema/AST
OpenACC 3.3-NEXT has changed the way tags for copy, copyin, copyout, and
create clauses are specified, and end up adding a few extras, and
permits them as a list. This patch encodes these as bitmask enum so
they can be stored succinctly, but still diagnose reasonably.
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index f27be5f..a48c050 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -8715,6 +8715,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { case OpenACCClauseKind::PresentOrCopy: { const auto *CC = cast<OpenACCCopyClause>(C); writeSourceLocation(CC->getLParenLoc()); + writeEnum(CC->getModifierList()); writeOpenACCVarList(CC); return; } @@ -8723,7 +8724,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { case OpenACCClauseKind::PresentOrCopyIn: { const auto *CIC = cast<OpenACCCopyInClause>(C); writeSourceLocation(CIC->getLParenLoc()); - writeBool(CIC->isReadOnly()); + writeEnum(CIC->getModifierList()); writeOpenACCVarList(CIC); return; } @@ -8732,7 +8733,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { case OpenACCClauseKind::PresentOrCopyOut: { const auto *COC = cast<OpenACCCopyOutClause>(C); writeSourceLocation(COC->getLParenLoc()); - writeBool(COC->isZero()); + writeEnum(COC->getModifierList()); writeOpenACCVarList(COC); return; } @@ -8741,7 +8742,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { case OpenACCClauseKind::PresentOrCreate: { const auto *CC = cast<OpenACCCreateClause>(C); writeSourceLocation(CC->getLParenLoc()); - writeBool(CC->isZero()); + writeEnum(CC->getModifierList()); writeOpenACCVarList(CC); return; } |