Skip to content

Commit b60c252

Browse files
author
Sunil Kuravinakop
committed
Added OMPLexicalScope before emitting if-else statement.
1 parent b2571fa commit b60c252

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/CodeGen/CGStmtOpenMP.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,7 +4577,7 @@ static void transformCallInStmt(Stmt *StmtP) {
45774577
}
45784578
}
45794579

4580-
static void EmitIfElse(CodeGenFunction *CGF, Expr *Condition,
4580+
static void emitIfElse(CodeGenFunction *CGF, Expr *Condition,
45814581
Stmt *AssociatedStmt) {
45824582
llvm::Value *CondValue = CGF->EvaluateExprAsBool(Condition);
45834583
llvm::BasicBlock *ThenBlock = CGF->createBasicBlock("if.then");
@@ -4633,8 +4633,9 @@ void CodeGenFunction::EmitOMPDispatchDirective(const OMPDispatchDirective &S) {
46334633
Condition =
46344634
getCapturedExprFromImplicitCastExpr(NoContextC->getCondition());
46354635
}
4636+
OMPLexicalScope Scope(CGF, S, OMPD_unknown);
46364637
/* OMPC_novariants or OMPC_nocontext present */
4637-
EmitIfElse(this, Condition, AssociatedStmt);
4638+
emitIfElse(this, Condition, AssociatedStmt);
46384639
}
46394640
} else
46404641
EmitStmt(AssociatedStmt);

0 commit comments

Comments
 (0)