diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2016-07-28 14:23:26 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2016-07-28 14:23:26 +0000 |
commit | cc10b85789a03b2b32d5b9c5873cdbb1ecac82b0 (patch) | |
tree | 6ec7eb5d8945e8937487aab4fef38be1f0591346 /clang/lib/Serialization/ASTWriterStmt.cpp | |
parent | 19459580afe9ca86af24e71470e7fd413b0852e2 (diff) | |
download | bcm5719-llvm-cc10b85789a03b2b32d5b9c5873cdbb1ecac82b0.tar.gz bcm5719-llvm-cc10b85789a03b2b32d5b9c5873cdbb1ecac82b0.zip |
[OpenMP] Codegen for use_device_ptr clause.
Summary: This patch adds support for the use_device_ptr clause. It includes changes in SEMA that could not be tested without codegen, namely, the use of the first private logic and mappable expressions support.
Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev
Subscribers: caomhin, cfe-commits
Differential Revision: https://reviews.llvm.org/D22691
llvm-svn: 276977
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 824d720f7d0..611ace958f1 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -2151,9 +2151,25 @@ void OMPClauseWriter::VisitOMPFromClause(OMPFromClause *C) { void OMPClauseWriter::VisitOMPUseDevicePtrClause(OMPUseDevicePtrClause *C) { Record.push_back(C->varlist_size()); + Record.push_back(C->getUniqueDeclarationsNum()); + Record.push_back(C->getTotalComponentListNum()); + Record.push_back(C->getTotalComponentsNum()); Record.AddSourceLocation(C->getLParenLoc()); - for (auto *VE : C->varlists()) { + for (auto *E : C->varlists()) + Record.AddStmt(E); + for (auto *VE : C->private_copies()) Record.AddStmt(VE); + for (auto *VE : C->inits()) + Record.AddStmt(VE); + for (auto *D : C->all_decls()) + Record.AddDeclRef(D); + for (auto N : C->all_num_lists()) + Record.push_back(N); + for (auto N : C->all_lists_sizes()) + Record.push_back(N); + for (auto &M : C->all_components()) { + Record.AddStmt(M.getAssociatedExpression()); + Record.AddDeclRef(M.getAssociatedDeclaration()); } } |