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
This commit is contained in:
Michael Wong 2015-08-11 04:52:01 +00:00
parent 7af183d841
commit b5c1698994
1 changed files with 3 additions and 1 deletions

View File

@ -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()); });
}