[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)
Michael Kruse via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 11 05:48:43 PST 2024
================
@@ -2331,8 +2332,11 @@ void CGOpenMPRuntime::emitBarrierCall(CodeGenFunction &CGF, SourceLocation Loc,
auto *OMPRegionInfo =
dyn_cast_or_null<CGOpenMPRegionInfo>(CGF.CapturedStmtInfo);
if (CGF.CGM.getLangOpts().OpenMPIRBuilder) {
- CGF.Builder.restoreIP(OMPBuilder.createBarrier(
- CGF.Builder, Kind, ForceSimpleCall, EmitChecks));
+ llvm::OpenMPIRBuilder::InsertPointOrErrorTy AfterIP =
+ OMPBuilder.createBarrier(CGF.Builder, Kind, ForceSimpleCall,
+ EmitChecks);
+ assert(AfterIP && "unexpected error creating barrier");
----------------
Meinersbur wrote:
[serious] @skatrak `assert` is active by `LLVM_ENABLED_ASSERTS`, but `llvm::Error`/`llvm::Expected` uses `LLVM_ABI_BREAKING_CHECKS`. In the configuration `-DLLVM_ENABLED_ASSERTS=OFF -DLLVM_ABI_BREAKING_CHECKS=FORCE_ON` the error check is not done, but then crashes unconditional to about unchecked errors.
https://github.com/llvm/llvm-project/pull/112533
More information about the cfe-commits
mailing list