Make ModuleEnvironment's target_config() return by value.
This makes it more consistent with the other target_config() functions which were all changed to return by value.
This commit is contained in:
@@ -338,8 +338,8 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
|
impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
|
||||||
fn target_config(&self) -> &TargetFrontendConfig {
|
fn target_config(&self) -> TargetFrontendConfig {
|
||||||
&self.info.config
|
self.info.config
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_func_name(&self, func_index: FuncIndex) -> ir::ExternalName {
|
fn get_func_name(&self, func_index: FuncIndex) -> ir::ExternalName {
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ pub trait FuncEnvironment {
|
|||||||
/// by the user, they are only for `cranelift-wasm` internal use.
|
/// by the user, they are only for `cranelift-wasm` internal use.
|
||||||
pub trait ModuleEnvironment<'data> {
|
pub trait ModuleEnvironment<'data> {
|
||||||
/// Get the information needed to produce Cranelift IR for the current target.
|
/// Get the information needed to produce Cranelift IR for the current target.
|
||||||
fn target_config(&self) -> &TargetFrontendConfig;
|
fn target_config(&self) -> TargetFrontendConfig;
|
||||||
|
|
||||||
/// Return the name for the given function index.
|
/// Return the name for the given function index.
|
||||||
fn get_func_name(&self, func_index: FuncIndex) -> ir::ExternalName;
|
fn get_func_name(&self, func_index: FuncIndex) -> ir::ExternalName;
|
||||||
|
|||||||
Reference in New Issue
Block a user