diff options
Diffstat (limited to 'clang/lib/Serialization/ASTReaderStmt.cpp')
| -rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 98955f63af2..6969823030d 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -1777,6 +1777,9 @@ OMPClause *OMPClauseReader::readClause() { case OMPC_seq_cst: C = new (Context) OMPSeqCstClause(); break; + case OMPC_threads: + C = new (Context) OMPThreadsClause(); + break; case OMPC_private: C = OMPPrivateClause::CreateEmpty(Context, Record[Idx++]); break; @@ -1899,6 +1902,8 @@ void OMPClauseReader::VisitOMPCaptureClause(OMPCaptureClause *) {} void OMPClauseReader::VisitOMPSeqCstClause(OMPSeqCstClause *) {} +void OMPClauseReader::VisitOMPThreadsClause(OMPThreadsClause *) {} + void OMPClauseReader::VisitOMPPrivateClause(OMPPrivateClause *C) { C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); unsigned NumVars = C->varlist_size(); @@ -2281,6 +2286,8 @@ void ASTStmtReader::VisitOMPFlushDirective(OMPFlushDirective *D) { void ASTStmtReader::VisitOMPOrderedDirective(OMPOrderedDirective *D) { VisitStmt(D); + // The NumClauses field was read in ReadStmtFromStream. + ++Idx; VisitOMPExecutableDirective(D); } @@ -2921,7 +2928,8 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { break; case STMT_OMP_ORDERED_DIRECTIVE: - S = OMPOrderedDirective::CreateEmpty(Context, Empty); + S = OMPOrderedDirective::CreateEmpty( + Context, Record[ASTStmtReader::NumStmtFields], Empty); break; case STMT_OMP_ATOMIC_DIRECTIVE: |

