aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-extern.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-extern.h')
-rw-r--r--gcc/rust/backend/rust-compile-extern.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/rust/backend/rust-compile-extern.h b/gcc/rust/backend/rust-compile-extern.h
index 582cceb..c8397bf 100644
--- a/gcc/rust/backend/rust-compile-extern.h
+++ b/gcc/rust/backend/rust-compile-extern.h
@@ -51,7 +51,7 @@ public:
Bvariable *lookup = Bvariable::error_variable ();
if (ctx->lookup_var_decl (item.get_mappings ().get_hirid (), &lookup))
{
- reference = ctx->get_backend ()->var_expression (lookup, ref_locus);
+ reference = Backend::var_expression (lookup, ref_locus);
return;
}
@@ -70,13 +70,12 @@ public:
bool in_unique_section = false;
Bvariable *static_global
- = ctx->get_backend ()->global_variable (name, asm_name, type, is_external,
- is_hidden, in_unique_section,
- item.get_locus ());
+ = Backend::global_variable (name, asm_name, type, is_external, is_hidden,
+ in_unique_section, item.get_locus ());
ctx->insert_var_decl (item.get_mappings ().get_hirid (), static_global);
ctx->push_var (static_global);
- reference = ctx->get_backend ()->var_expression (static_global, ref_locus);
+ reference = Backend::var_expression (static_global, ref_locus);
}
void visit (HIR::ExternalFunctionItem &function) override
@@ -145,9 +144,8 @@ public:
}
const unsigned int flags = Backend::function_is_declaration;
- tree fndecl
- = ctx->get_backend ()->function (compiled_fn_type, ir_symbol_name,
- asm_name, flags, function.get_locus ());
+ tree fndecl = Backend::function (compiled_fn_type, ir_symbol_name, asm_name,
+ flags, function.get_locus ());
TREE_PUBLIC (fndecl) = 1;
setup_abi_options (fndecl, fntype->get_abi ());