[OPENMP 4.0] Add 'if' clause for 'cancel' directive.
Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive. llvm-svn: 247976
This commit is contained in:
@@ -2262,7 +2262,15 @@ void CodeGenFunction::EmitOMPCancellationPointDirective(
|
||||
}
|
||||
|
||||
void CodeGenFunction::EmitOMPCancelDirective(const OMPCancelDirective &S) {
|
||||
CGM.getOpenMPRuntime().emitCancelCall(*this, S.getLocStart(),
|
||||
const Expr *IfCond = nullptr;
|
||||
for (const auto *C : S.getClausesOfKind<OMPIfClause>()) {
|
||||
if (C->getNameModifier() == OMPD_unknown ||
|
||||
C->getNameModifier() == OMPD_cancel) {
|
||||
IfCond = C->getCondition();
|
||||
break;
|
||||
}
|
||||
}
|
||||
CGM.getOpenMPRuntime().emitCancelCall(*this, S.getLocStart(), IfCond,
|
||||
S.getCancelRegion());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user