diff options
author | Faisal Abbas <90.abbasfaisal@gmail.com> | 2022-05-26 09:07:22 +0100 |
---|---|---|
committer | Faisal Abbas <90.abbasfaisal@gmail.com> | 2022-05-26 09:10:31 +0100 |
commit | 1a04c501e41ec0dee74d520a7ca4373cb7df7a48 (patch) | |
tree | c41616a963a2693b1a5fda1aa1a5b9a3707c2bbc /gcc/rust/backend/rust-compile-expr.h | |
parent | d5c1531cc41ea7fab4d522dafe3ff725a766fb49 (diff) | |
download | gcc-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.h | 2 |
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); |