summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-11-18 10:14:22 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-11-18 10:14:22 +0000
commit62cec44ca45121206d611722f98b109ecbd6e11d (patch)
tree55066140d95e462f0a67a0336f8ebd7b399eef67 /clang/lib/Serialization/ASTWriterStmt.cpp
parent6fdb6b8fd4e18c0741a839a11d7dee7077bc7505 (diff)
downloadbcm5719-llvm-62cec44ca45121206d611722f98b109ecbd6e11d.tar.gz
bcm5719-llvm-62cec44ca45121206d611722f98b109ecbd6e11d.zip
[OPENMP] Additional processing of 'omp atomic read' directive.
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it. llvm-svn: 222231
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 309e0a65329..38996ddd90a 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -1978,6 +1978,9 @@ void ASTStmtWriter::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
VisitStmt(D);
Record.push_back(D->getNumClauses());
VisitOMPExecutableDirective(D);
+ Writer.AddStmt(D->getX());
+ Writer.AddStmt(D->getV());
+ Writer.AddStmt(D->getExpr());
Code = serialization::STMT_OMP_ATOMIC_DIRECTIVE;
}
OpenPOWER on IntegriCloud