aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorerichkeane <ekeane@nvidia.com>2025-08-19 07:39:33 -0700
committererichkeane <ekeane@nvidia.com>2025-08-19 07:58:11 -0700
commitd0dc3799b70bb6b51ed2e90b93f8ea5d4f30cef1 (patch)
tree921c7bb3e29554bffc49d2ea3af3981e46e6ab48 /clang/lib/Serialization/ASTWriter.cpp
parent50a3368f226ad954fc26c8d79c0a10e2b644350d (diff)
downloadllvm-d0dc3799b70bb6b51ed2e90b93f8ea5d4f30cef1.zip
llvm-d0dc3799b70bb6b51ed2e90b93f8ea5d4f30cef1.tar.gz
llvm-d0dc3799b70bb6b51ed2e90b93f8ea5d4f30cef1.tar.bz2
[OpenACC][NFCI] Add AST Infrastructure for reduction recipes
This patch does the bare minimum to start setting up the reduction recipe support, including adding a type to the AST to store it. No real additional work is done, and a bunch of static_asserts are left around to allow us to do this properly.
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 9faf107..a732739 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -8886,6 +8886,11 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
writeSourceLocation(RC->getLParenLoc());
writeEnum(RC->getReductionOp());
writeOpenACCVarList(RC);
+
+ for (const OpenACCReductionRecipe &R : RC->getRecipes()) {
+ static_assert(sizeof(OpenACCReductionRecipe) == sizeof(int *));
+ AddDeclRef(R.RecipeDecl);
+ }
return;
}
case OpenACCClauseKind::Seq: