r244569 - This patch fixes the assert in emitting captured code in the target data construct.

Michael Wong via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 21:52:01 PDT 2015


Author: fraggamuffin
Date: Mon Aug 10 23:52:01 2015
New Revision: 244569

URL: http://llvm.org/viewvc/llvm-project?rev=244569&view=rev
Log:
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

Modified:
    cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp

Modified: cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp?rev=244569&r1=244568&r2=244569&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp Mon Aug 10 23:52:01 2015
@@ -2156,5 +2156,7 @@ void CodeGenFunction::EmitOMPTargetDataD
 
   // 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()); });
 }




More information about the cfe-commits mailing list