================
@@ -1496,7 +1507,8 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::createParallel(
   // Let the caller create the body.
   assert(BodyGenCB && "Expected body generation callback!");
   InsertPointTy CodeGenIP(PRegBodyBB, PRegBodyBB->begin());
-  BodyGenCB(InnerAllocaIP, CodeGenIP);
+  if (Error Err = BodyGenCB(InnerAllocaIP, CodeGenIP))
+    return std::move(Err);
----------------
tblah wrote:

I'm less sure about this case because it is constructing an `Expected<>` from 
the `Error`. It is more like
```
return Expected<OpenMPIRBuilder::InsertPointTy>{std::move(Err)};
```

I'm not sure if this `std::move` is a guaranteed compiler optimization in the 
same way as the above cases.

https://github.com/llvm/llvm-project/pull/112533
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to