aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorFaisal Abbas <90.abbasfaisal@gmail.com>2022-05-26 09:07:22 +0100
committerFaisal Abbas <90.abbasfaisal@gmail.com>2022-05-26 09:10:31 +0100
commit1a04c501e41ec0dee74d520a7ca4373cb7df7a48 (patch)
treec41616a963a2693b1a5fda1aa1a5b9a3707c2bbc /gcc/rust/backend/rust-compile-expr.h
parentd5c1531cc41ea7fab4d522dafe3ff725a766fb49 (diff)
downloadgcc-1a04c501e41ec0dee74d520a7ca4373cb7df7a48.zip
gcc-1a04c501e41ec0dee74d520a7ca4373cb7df7a48.tar.gz
gcc-1a04c501e41ec0dee74d520a7ca4373cb7df7a48.tar.bz2
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>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r--gcc/rust/backend/rust-compile-expr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index 655ffbb..593e1f9 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -492,7 +492,7 @@ public:
{
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);