diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-02 16:32:39 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-02 16:32:39 +0000 |
commit | 3ac9cc204042907aa7a1665d10ace04995f15456 (patch) | |
tree | 38bfe9ffdd86dcaebe83282691cc6daded563abf /lib/Serialization | |
parent | 4e0b56c202361f464daadc14e860a7842f7edbb2 (diff) | |
download | clang-3ac9cc204042907aa7a1665d10ace04995f15456.tar.gz |
[OPENMP] Capture argument of `device` clause for target-based
directives.
The argument of the `device` clause in target-based executable
directives must be captured to support codegen for the `target`
directives with the `depend` clauses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization')
-rw-r--r-- | lib/Serialization/ASTReaderStmt.cpp | 1 | ||||
-rw-r--r-- | lib/Serialization/ASTWriterStmt.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp index bff8f9d05f..2b8a10f174 100644 --- a/lib/Serialization/ASTReaderStmt.cpp +++ b/lib/Serialization/ASTReaderStmt.cpp @@ -2347,6 +2347,7 @@ void OMPClauseReader::VisitOMPDependClause(OMPDependClause *C) { } void OMPClauseReader::VisitOMPDeviceClause(OMPDeviceClause *C) { + VisitOMPClauseWithPreInit(C); C->setDevice(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index 1bc64b6a17..15d2425713 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -2102,6 +2102,7 @@ void OMPClauseWriter::VisitOMPDependClause(OMPDependClause *C) { } void OMPClauseWriter::VisitOMPDeviceClause(OMPDeviceClause *C) { + VisitOMPClauseWithPreInit(C); Record.AddStmt(C->getDevice()); Record.AddSourceLocation(C->getLParenLoc()); } |