aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-gcc.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-02-10 17:08:13 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-02-10 19:28:10 +0000
commitb2aa172ff69591452e3566c105f2a4cd8450eab5 (patch)
treef9ba781f9c6b29fd8d70f1964f7e238d1ade4f77 /gcc/rust/rust-gcc.cc
parent1b487d72cd2ba46671f5a1bcc20970f2dad1b759 (diff)
downloadgcc-b2aa172ff69591452e3566c105f2a4cd8450eab5.zip
gcc-b2aa172ff69591452e3566c105f2a4cd8450eab5.tar.gz
gcc-b2aa172ff69591452e3566c105f2a4cd8450eab5.tar.bz2
Refactor code to reuse a canonical way to compile functions and constants
This is a big cleanup so all paths that compile functions and constants end up in the same path so we avoid any duplication in how we actually compile a function.
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r--gcc/rust/rust-gcc.cc14
1 files changed, 0 insertions, 14 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index 86a4106..b648365 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -229,8 +229,6 @@ public:
tree convert_expression (tree type, tree expr, Location);
- tree function_code_expression (tree, Location);
-
tree struct_field_expression (tree, size_t, Location);
tree compound_expression (tree, tree, Location);
@@ -1305,18 +1303,6 @@ Gcc_backend::convert_expression (tree type_tree, tree expr_tree,
return ret;
}
-// Get the address of a function.
-
-tree
-Gcc_backend::function_code_expression (tree func, Location location)
-{
- if (func == error_mark_node)
- return this->error_expression ();
-
- tree ret = build_fold_addr_expr_loc (location.gcc_location (), func);
- return ret;
-}
-
// Return an expression for the field at INDEX in BSTRUCT.
tree