This patch commits OpenMP 4 target device clauses
This is committed on behalf of Kelvin Li
http://reviews.llvm.org/D11469?id=31227
llvm-svn: 244325
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index f95e66f..1de92d3 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -1788,6 +1788,9 @@
case OMPC_depend:
C = OMPDependClause::CreateEmpty(Context, Record[Idx++]);
break;
+ case OMPC_device:
+ C = new (Context) OMPDeviceClause();
+ break;
}
Visit(C);
C->setLocStart(Reader->ReadSourceLocation(Record, Idx));
@@ -2068,6 +2071,11 @@
C->setVarRefs(Vars);
}
+void OMPClauseReader::VisitOMPDeviceClause(OMPDeviceClause *C) {
+ C->setDevice(Reader->Reader.ReadSubExpr());
+ C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
+}
+
//===----------------------------------------------------------------------===//
// OpenMP Directives.
//===----------------------------------------------------------------------===//