aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-02-11 10:27:55 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-02-11 10:27:55 +0000
commit4242d45d3d6590630ea88909ed996b8cf2640d35 (patch)
treed4059dbe453be902ebd68d4704160db6942bb1b3 /gcc/rust/backend/rust-compile-base.h
parent5801e165b3902f3376387649c632933c05647274 (diff)
downloadgcc-4242d45d3d6590630ea88909ed996b8cf2640d35.zip
gcc-4242d45d3d6590630ea88909ed996b8cf2640d35.tar.gz
gcc-4242d45d3d6590630ea88909ed996b8cf2640d35.tar.bz2
refactor named_constant_expression out of the backend class
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.h')
-rw-r--r--gcc/rust/backend/rust-compile-base.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h
index 17e889c..a52886c 100644
--- a/gcc/rust/backend/rust-compile-base.h
+++ b/gcc/rust/backend/rust-compile-base.h
@@ -96,6 +96,10 @@ protected:
compile_constant_item (Context *ctx, TyTy::BaseType *resolved_type,
const Resolver::CanonicalPath *canonical_path,
HIR::Expr *const_value_expr, Location locus);
+
+ static tree named_constant_expression (tree type_tree,
+ const std::string &name,
+ tree const_val, Location location);
};
} // namespace Compile