diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-03 07:23:48 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-03 07:23:48 +0000 |
commit | 6b8046addfce08aa075f0db860f8a5a29fd6e45f (patch) | |
tree | 0590b52d3fa9f08eb5fe3b86828cbcd3931a1bcd /clang/lib/Serialization/ASTReaderStmt.cpp | |
parent | 49948af9cd20eea2b9a504dbb25b2779e507c57f (diff) | |
download | bcm5719-llvm-6b8046addfce08aa075f0db860f8a5a29fd6e45f.tar.gz bcm5719-llvm-6b8046addfce08aa075f0db860f8a5a29fd6e45f.zip |
[OPENMP 4.1] Parsing/sema analysis for extended format of 'if' clause.
OpenMP 4.1 added special 'directive-name-modifier' to the 'if' clause.
Format of 'if' clause is as follows:
```
if([ directive-name-modifier :] scalar-logical-expression)
```
The restriction rules are also changed.
1. If any 'if' clause on the directive includes a 'directive-name-modifier' then all 'if' clauses on the directive must include a 'directive-name-modifier'.
2. At most one 'if' clause without a 'directive-name-modifier' can appear on the directive.
3. At most one 'if' clause with some particular 'directive-name-modifier' can appear on the directive.
'directive-name-modifier' is important for combined directives and allows to separate conditions in 'if' clause for simple sub-directives in combined directive. This 'directive-name-modifier' identifies the sub-directive to which this 'if' clause must be applied.
llvm-svn: 246747
Diffstat (limited to 'clang/lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 2d6f5e0db7f..9446db842f3 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -1812,6 +1812,9 @@ OMPClause *OMPClauseReader::readClause() { } void OMPClauseReader::VisitOMPIfClause(OMPIfClause *C) { + C->setNameModifier(static_cast<OpenMPDirectiveKind>(Record[Idx++])); + C->setNameModifierLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setColonLoc(Reader->ReadSourceLocation(Record, Idx)); C->setCondition(Reader->Reader.ReadSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); } |