aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorerichkeane <ekeane@nvidia.com>2025-04-02 08:06:21 -0700
committererichkeane <ekeane@nvidia.com>2025-04-02 10:03:24 -0700
commitd7724c8ea313e5d64ef35102958213dcd98f53ea (patch)
tree2ebc50ab93d611bc4509eac3a754537301e6038e /clang/lib/Serialization/ASTWriterStmt.cpp
parentb6e2df54c4c0de6786f98ec5feb8223aa7677dc9 (diff)
downloadllvm-d7724c8ea313e5d64ef35102958213dcd98f53ea.zip
llvm-d7724c8ea313e5d64ef35102958213dcd98f53ea.tar.gz
llvm-d7724c8ea313e5d64ef35102958213dcd98f53ea.tar.bz2
[OpenACC] allow 'if' clause on 'atomic' construct
This was added in OpenACC PR #511 in the 3.4 branch. From an AST/Sema perspective this is pretty trivial as the infrastructure for 'if' already exists, however the atomic construct needed to be taught to take clauses. This patch does that and adds some testing to do so.
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 037eb13..0860704 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -3014,9 +3014,7 @@ void ASTStmtWriter::VisitOpenACCWaitConstruct(OpenACCWaitConstruct *S) {
void ASTStmtWriter::VisitOpenACCAtomicConstruct(OpenACCAtomicConstruct *S) {
VisitStmt(S);
- Record.writeEnum(S->Kind);
- Record.AddSourceRange(S->Range);
- Record.AddSourceLocation(S->DirectiveLoc);
+ VisitOpenACCConstructStmt(S);
Record.writeEnum(S->getAtomicKind());
Record.AddStmt(S->getAssociatedStmt());