================
@@ -781,9 +841,26 @@ class ScalarExprEmitter : public
StmtVisitor<ScalarExprEmitter, mlir::Value> {
return result;
}
+ mlir::Value foldUnaryOp(const UnaryOperator *e) {
+ Expr::EvalResult result;
+ if (!e->EvaluateAsRValue(result, cgf.getContext()))
----------------
andykaylor wrote:
Yes, I was looking at `createOrFold`, and that looks promising.
https://github.com/llvm/llvm-project/pull/174670
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits