================
@@ -540,12 +540,20 @@ 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)) {
+  std::optional<mlir::Value> valueOpt =
----------------
bcardosolopes wrote:

This is just working around the fact that `emitTargetBuiltinExpr` is not 
returning an `RValue` already. It's a bit more work but you should change 
`emitTargetBuiltinExpr` to return an `RValue` instead. You can then change 
`evalKind` below and use `isScalar()`, etc methods from RValue.

Also, whenever you need to emit `RValue::get(nullptr)`, please use 
`RValue::getIgnored()` instead.

https://github.com/llvm/llvm-project/pull/168051
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to