[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)
Sergio Afonso via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 22 08:58:10 PDT 2024
================
@@ -2331,8 +2332,10 @@ 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));
+ auto Result = OMPBuilder.createBarrier(CGF.Builder, Kind, ForceSimpleCall,
----------------
skatrak wrote:
The reason I've tended towards `auto` in this patch is that the full type in this case is `llvm::Expected<llvm::OpenMPIRBuilder::InsertPointTy>`, which is quite verbose, so I thought it was justified in this case for readability. But you're right, it doesn't look like the style guide is making an exception for such cases, so I'll look into updating the PR based on this comment.
Maybe adding an `InsertPointOrErrorTy` typedef would be a good way to address this.
https://github.com/llvm/llvm-project/pull/112533
More information about the cfe-commits
mailing list