diff options
author | erichkeane <ekeane@nvidia.com> | 2025-08-06 10:17:31 -0700 |
---|---|---|
committer | erichkeane <ekeane@nvidia.com> | 2025-08-06 10:18:34 -0700 |
commit | b291d02a93bcd24c34cdc0febc327270dc9ceb0c (patch) | |
tree | 3b59558bbe34ecab02c400fc15f2075d4996faa3 /clang/lib/Serialization/ASTWriter.cpp | |
parent | 25bf86fedeb0dd46f4d3b6a434ef02e4e37c89f5 (diff) | |
download | llvm-b291d02a93bcd24c34cdc0febc327270dc9ceb0c.zip llvm-b291d02a93bcd24c34cdc0febc327270dc9ceb0c.tar.gz llvm-b291d02a93bcd24c34cdc0febc327270dc9ceb0c.tar.bz2 |
[OpenACC][NFCI] Add extra data to firstprivate recipe AST node
During implementation I found that I need some additional data in the
AST node for codegen, so this patch adds the second declaration
reference.
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index c038d4d..f144cd2 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -8762,8 +8762,10 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { writeSourceLocation(FPC->getLParenLoc()); writeOpenACCVarList(FPC); - for (VarDecl *VD : FPC->getInitRecipes()) - AddDeclRef(VD); + for (const OpenACCFirstPrivateRecipe &R : FPC->getInitRecipes()) { + AddDeclRef(R.RecipeDecl); + AddDeclRef(R.InitFromTemporary); + } return; } case OpenACCClauseKind::Attach: { |