From 1a04c501e41ec0dee74d520a7ca4373cb7df7a48 Mon Sep 17 00:00:00 2001 From: Faisal Abbas <90.abbasfaisal@gmail.com> Date: Thu, 26 May 2022 09:07:22 +0100 Subject: const folding in gccrs: remove ConstCtx class. This class has potential to hinder porting further const folding code from C++. So this edit makes it easy to copy code from constexpr.cc to rust-constexpr.cc and so on. Signed-off-by: Faisal Abbas <90.abbasfaisal@gmail.com> --- gcc/rust/backend/rust-compile-expr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/backend/rust-compile-expr.cc') diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index b176ed2..77819cf 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -449,7 +449,7 @@ CompileExpr::visit (HIR::CallExpr &expr) { HIR::Expr *discrim_expr = variant->get_discriminant (); tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx); - tree folded_discrim_expr = ConstCtx::fold (discrim_expr_node); + tree folded_discrim_expr = fold_expr (discrim_expr_node); tree qualifier = folded_discrim_expr; ctor_arguments.push_back (qualifier); -- cgit v1.1