diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-03-27 14:14:31 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-03-27 14:14:31 +0000 |
commit | 18917301298ad6df9e989983ed1e22cb0f9dff29 (patch) | |
tree | ddc404c8b5f6bab6230c46c9f09ca0cc5f7cb6be /lib/Serialization/ASTReader.cpp | |
parent | 7c21fe2c07d1df4480ddf35a03d218e0f5b4af3d (diff) |
[OPENMP]Initial support for 'allocate' clause.
Added parsing/sema analysis of the allocate clause.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 5ca5e8de55..d381f9e9bd 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -11884,6 +11884,9 @@ OMPClause *OMPClauseReader::readClause() { C = OMPIsDevicePtrClause::CreateEmpty(Context, Sizes); break; } + case OMPC_allocate: + C = OMPAllocateClause::CreateEmpty(Context, Record.readInt()); + break; } Visit(C); C->setLocStart(Record.readSourceLocation()); @@ -12379,6 +12382,18 @@ void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) { C->setComponents(Components, ListSizes); } +void OMPClauseReader::VisitOMPAllocateClause(OMPAllocateClause *C) { + C->setLParenLoc(Record.readSourceLocation()); + C->setColonLoc(Record.readSourceLocation()); + C->setAllocator(Record.readSubExpr()); + unsigned NumVars = C->varlist_size(); + SmallVector<Expr *, 16> Vars; + Vars.reserve(NumVars); + for (unsigned i = 0; i != NumVars; ++i) + Vars.push_back(Record.readSubExpr()); + C->setVarRefs(Vars); +} + void OMPClauseReader::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) { VisitOMPClauseWithPreInit(C); C->setNumTeams(Record.readSubExpr()); |