Skip to content

Commit 6c678b7

Browse files
committed
Don't use clang's callback to hack the cancellation branch
This conflicted with my hack doing the same thing: leading to a use-after-free of the old terminator. I think it is more helpful to do this in OpenMPIRBuilder than replicating the hack in callbacks in both clang and mlir.
1 parent fac4240 commit 6c678b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/CodeGen/CGStmtOpenMP.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -4345,8 +4345,9 @@ void CodeGenFunction::EmitOMPSectionsDirective(const OMPSectionsDirective &S) {
43454345
using InsertPointTy = llvm::OpenMPIRBuilder::InsertPointTy;
43464346
using BodyGenCallbackTy = llvm::OpenMPIRBuilder::StorableBodyGenCallbackTy;
43474347

4348-
auto FiniCB = [this](InsertPointTy IP) {
4349-
OMPBuilderCBHelpers::FinalizeOMPRegion(*this, IP);
4348+
auto FiniCB = [](InsertPointTy IP) {
4349+
// Don't FinalizeOMPRegion because this is done inside of OMPIRBuilder for
4350+
// sections.
43504351
return llvm::Error::success();
43514352
};
43524353

0 commit comments

Comments
 (0)