diff options
author | Michael Wong <fraggamuffin@gmail.com> | 2015-08-11 04:52:01 +0000 |
---|---|---|
committer | Michael Wong <fraggamuffin@gmail.com> | 2015-08-11 04:52:01 +0000 |
commit | b5c16989940459f82fd7dde1a95c52cf17eb73bc (patch) | |
tree | ef8acbecde849766fa7e1ba89eb393735ee84bea /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | 7af183d841fc1c81e6c01d469a7b24da42425606 (diff) | |
download | bcm5719-llvm-b5c16989940459f82fd7dde1a95c52cf17eb73bc.tar.gz bcm5719-llvm-b5c16989940459f82fd7dde1a95c52cf17eb73bc.zip |
This patch fixes the assert in emitting captured code in the target data construct.
This is on behalf of Kelvin Li.
http://reviews.llvm.org/D11475
llvm-svn: 244569
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 65ba486d852..c75581f4cfd 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2156,5 +2156,7 @@ void CodeGenFunction::EmitOMPTargetDataDirective( // emit the code inside the construct for now auto CS = cast<CapturedStmt>(S.getAssociatedStmt()); - EmitStmt(CS->getCapturedStmt()); + CGM.getOpenMPRuntime().emitInlinedDirective( + *this, OMPD_target_data, + [&CS](CodeGenFunction &CGF) { CGF.EmitStmt(CS->getCapturedStmt()); }); } |