forked from OSchip/llvm-project
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:
parent
7af183d841
commit
b5c1698994
|
@ -2156,5 +2156,7 @@ void CodeGenFunction::EmitOMPTargetDataDirective(
|
||||||
|
|
||||||
// emit the code inside the construct for now
|
// emit the code inside the construct for now
|
||||||
auto CS = cast<CapturedStmt>(S.getAssociatedStmt());
|
auto CS = cast<CapturedStmt>(S.getAssociatedStmt());
|
||||||
EmitStmt(CS->getCapturedStmt());
|
CGM.getOpenMPRuntime().emitInlinedDirective(
|
||||||
|
*this, OMPD_target_data,
|
||||||
|
[&CS](CodeGenFunction &CGF) { CGF.EmitStmt(CS->getCapturedStmt()); });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue