================
@@ -1352,7 +1352,14 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl
&gd, unsigned builtinID,
}
// Now see if we can emit a target-specific builtin.
- if (mlir::Value v = emitTargetBuiltinExpr(builtinID, e, returnValue)) {
+ if (std::optional<mlir::Value> rst =
+ emitTargetBuiltinExpr(builtinID, e, returnValue)) {
+ mlir::Value v = rst.value();
+ // CIR dialect operations maybe have no results, no value will return
+ // even if it executes successfully.
----------------
Lancern wrote:
```suggestion
// CIR dialect operations may have no results, no values will be returned
// even if it executes successfully.
```
https://github.com/llvm/llvm-project/pull/171094
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits