summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderStmt.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-02-13 05:29:23 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-02-13 05:29:23 +0000
commitaadd52e5cc8776ed65c0850876a68a1f10a92f10 (patch)
tree6789802725add097bbba8e1e1ab597a4f697a863 /clang/lib/Serialization/ASTReaderStmt.cpp
parent0e3b5e0b20698558be7a30b42f3d245bf6a4af54 (diff)
downloadbcm5719-llvm-aadd52e5cc8776ed65c0850876a68a1f10a92f10.tar.gz
bcm5719-llvm-aadd52e5cc8776ed65c0850876a68a1f10a92f10.zip
[OPENMP] 'if' clause support (no CodeGen support)
llvm-svn: 201297
Diffstat (limited to 'clang/lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderStmt.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index 5d2f38d9526..e1ca51fcc19 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -1673,6 +1673,9 @@ public:
OMPClause *OMPClauseReader::readClause() {
OMPClause *C;
switch (Record[Idx++]) {
+ case OMPC_if:
+ C = new (Context) OMPIfClause();
+ break;
case OMPC_default:
C = new (Context) OMPDefaultClause();
break;
@@ -1693,6 +1696,11 @@ OMPClause *OMPClauseReader::readClause() {
return C;
}
+void OMPClauseReader::VisitOMPIfClause(OMPIfClause *C) {
+ C->setCondition(Reader->Reader.ReadSubExpr());
+ C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
+}
+
void OMPClauseReader::VisitOMPDefaultClause(OMPDefaultClause *C) {
C->setDefaultKind(
static_cast<OpenMPDefaultClauseKind>(Record[Idx++]));
OpenPOWER on IntegriCloud