kkwli0 created this revision.
kkwli0 added reviewers: rsmith, hfinkel, sfantao, ABataev, fraggamuffin.
kkwli0 added subscribers: Hahnfeld, cfe-commits.
This patch is to fix the assert in emitting captured code in the target data
construct.
http://reviews.llvm.org/D11475
Files:
lib/CodeGen/CGStmtOpenMP.cpp
Index: lib/CodeGen/CGStmtOpenMP.cpp
===================================================================
--- lib/CodeGen/CGStmtOpenMP.cpp
+++ lib/CodeGen/CGStmtOpenMP.cpp
@@ -2128,5 +2128,7 @@
// 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()); });
}
Index: lib/CodeGen/CGStmtOpenMP.cpp
===================================================================
--- lib/CodeGen/CGStmtOpenMP.cpp
+++ lib/CodeGen/CGStmtOpenMP.cpp
@@ -2128,5 +2128,7 @@
// 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()); });
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits