From b6e7084e25ad0592b8e29ceea6462952e2ad79b9 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Mon, 16 Dec 2019 15:54:17 -0500 Subject: [OPENMP50]Add parsing/sema analysis for nontemporal clause. Add basic support for parsing/sema analysis of the nontemporal clause in simd-based directives. --- clang/lib/Serialization/ASTReader.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'clang/lib/Serialization/ASTReader.cpp') diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index a2e4e7b469c..9258a6fb126 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -11698,6 +11698,9 @@ OMPClause *OMPClauseReader::readClause() { case OMPC_allocate: C = OMPAllocateClause::CreateEmpty(Context, Record.readInt()); break; + case OMPC_nontemporal: + C = OMPNontemporalClause::CreateEmpty(Context, Record.readInt()); + break; } assert(C && "Unknown OMPClause type"); @@ -12454,3 +12457,13 @@ void OMPClauseReader::VisitOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) { } C->setComponents(Components, ListSizes); } + +void OMPClauseReader::VisitOMPNontemporalClause(OMPNontemporalClause *C) { + C->setLParenLoc(Record.readSourceLocation()); + unsigned NumVars = C->varlist_size(); + SmallVector Vars; + Vars.reserve(NumVars); + for (unsigned i = 0; i != NumVars; ++i) + Vars.push_back(Record.readSubExpr()); + C->setVarRefs(Vars); +} -- cgit v1.2.3