aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r--gcc/rust/backend/rust-compile-fnparam.h14
-rw-r--r--gcc/rust/backend/rust-compile-var-decl.h11
2 files changed, 8 insertions, 17 deletions
diff --git a/gcc/rust/backend/rust-compile-fnparam.h b/gcc/rust/backend/rust-compile-fnparam.h
index 137bcad..4ca26ec 100644
--- a/gcc/rust/backend/rust-compile-fnparam.h
+++ b/gcc/rust/backend/rust-compile-fnparam.h
@@ -43,19 +43,18 @@ public:
if (!pattern.is_mut ())
decl_type = ctx->get_backend ()->immutable_type (decl_type);
- bool address_taken = false;
- compiled_param = ctx->get_backend ()->parameter_variable (
- fndecl, pattern.get_identifier (), decl_type, address_taken, locus);
+ compiled_param
+ = ctx->get_backend ()->parameter_variable (fndecl,
+ pattern.get_identifier (),
+ decl_type, locus);
}
void visit (HIR::WildcardPattern &pattern) override
{
decl_type = ctx->get_backend ()->immutable_type (decl_type);
- bool address_taken = false;
compiled_param
- = ctx->get_backend ()->parameter_variable (fndecl, "_", decl_type,
- address_taken, locus);
+ = ctx->get_backend ()->parameter_variable (fndecl, "_", decl_type, locus);
}
private:
@@ -82,9 +81,8 @@ public:
if (is_immutable)
decl_type = ctx->get_backend ()->immutable_type (decl_type);
- bool address_taken = false;
return ctx->get_backend ()->parameter_variable (fndecl, "self", decl_type,
- address_taken, locus);
+ locus);
}
};
diff --git a/gcc/rust/backend/rust-compile-var-decl.h b/gcc/rust/backend/rust-compile-var-decl.h
index 1da6cd4..7bc37eb 100644
--- a/gcc/rust/backend/rust-compile-var-decl.h
+++ b/gcc/rust/backend/rust-compile-var-decl.h
@@ -55,26 +55,19 @@ public:
if (!pattern.is_mut ())
translated_type = ctx->get_backend ()->immutable_type (translated_type);
- // this gets updated when the compilation _actually_ wants to take an
- // address
- bool address_taken = false;
compiled_variable
= ctx->get_backend ()->local_variable (fndecl, pattern.get_identifier (),
translated_type, NULL /*decl_var*/,
- address_taken, locus);
+ locus);
}
void visit (HIR::WildcardPattern &pattern) override
{
translated_type = ctx->get_backend ()->immutable_type (translated_type);
- // this gets updated when the compilation _actually_ wants to take an
- // address
- bool address_taken = false;
compiled_variable
= ctx->get_backend ()->local_variable (fndecl, "_", translated_type,
- NULL /*decl_var*/, address_taken,
- locus);
+ NULL /*decl_var*/, locus);
}
private: