diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2016-05-26 17:39:58 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2016-05-26 17:39:58 +0000 |
commit | 661c0904e144929ba9581a4bd7488961a8a1a331 (patch) | |
tree | db2ddc9f112aa8a17dc0c178dc1c07c10d2e28f2 /clang/lib/Serialization/ASTWriterStmt.cpp | |
parent | 7f32420ed520ae6298900e8a50109c265c4dba85 (diff) | |
download | bcm5719-llvm-661c0904e144929ba9581a4bd7488961a8a1a331.tar.gz bcm5719-llvm-661c0904e144929ba9581a4bd7488961a8a1a331.zip |
[OpenMP] Parsing and sema support for the to clause
Summary:
The patch contains the parsing and sema support for the `to` clause.
Patch based on the original post by Kelvin Li.
Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev
Subscribers: caomhin, cfe-commits
Differential Revision: http://reviews.llvm.org/D18597
llvm-svn: 270880
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 1d650b3b8de..1afc00410b5 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -2091,6 +2091,26 @@ void OMPClauseWriter::VisitOMPDefaultmapClause(OMPDefaultmapClause *C) { Record.AddSourceLocation(C->getDefaultmapKindLoc()); } +void OMPClauseWriter::VisitOMPToClause(OMPToClause *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 *E : C->varlists()) + Record.AddStmt(E); + 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()); + } +} + //===----------------------------------------------------------------------===// // OpenMP Directives. //===----------------------------------------------------------------------===// |