diff options
author | Michael Wong <fraggamuffin@gmail.com> | 2015-07-21 13:44:28 +0000 |
---|---|---|
committer | Michael Wong <fraggamuffin@gmail.com> | 2015-07-21 13:44:28 +0000 |
commit | 65f367fcbbf38e599b2f747ca101c97d40c6420d (patch) | |
tree | fb0045186e3262cb10d2e591043d47cbba1c2b18 /clang/lib/CodeGen | |
parent | fbb86b2350e58876c243c882b3315c45888453dc (diff) | |
download | bcm5719-llvm-65f367fcbbf38e599b2f747ca101c97d40c6420d.tar.gz bcm5719-llvm-65f367fcbbf38e599b2f747ca101c97d40c6420d.zip |
Commit for http://reviews.llvm.org/D10765
for OpenMP 4 target data directive parsing and sema.
This commit is on behalf of Kelvin Li.
llvm-svn: 242785
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 9 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index f58c2f440a6..d3fa7f27c5c 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -246,6 +246,9 @@ void CodeGenFunction::EmitStmt(const Stmt *S) { case Stmt::OMPCancelDirectiveClass: EmitOMPCancelDirective(cast<OMPCancelDirective>(*S)); break; + case Stmt::OMPTargetDataDirectiveClass: + EmitOMPTargetDataDirective(cast<OMPTargetDataDirective>(*S)); + break; } } diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index b11372bbcb7..2069e9a2974 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2121,3 +2121,12 @@ CodeGenFunction::getOMPCancelDestination(OpenMPDirectiveKind Kind) { : BreakContinueStack.back().BreakBlock; return JumpDest(); } + +// Generate the instructions for '#pragma omp target data' directive. +void CodeGenFunction::EmitOMPTargetDataDirective( + const OMPTargetDataDirective &S) { + + // emit the code inside the construct for now + auto CS = cast<CapturedStmt>(S.getAssociatedStmt()); + EmitStmt(CS->getCapturedStmt()); +} diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index b8e97ac261d..1144a82c9f9 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2213,6 +2213,7 @@ public: void EmitOMPOrderedDirective(const OMPOrderedDirective &S); void EmitOMPAtomicDirective(const OMPAtomicDirective &S); void EmitOMPTargetDirective(const OMPTargetDirective &S); + void EmitOMPTargetDataDirective(const OMPTargetDataDirective &S); void EmitOMPTeamsDirective(const OMPTeamsDirective &S); void EmitOMPCancellationPointDirective(const OMPCancellationPointDirective &S); |