From 1ccf056baf7f847b2788f0bc22a39d11eb2c948a Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 15 Oct 2019 10:25:12 +0200 Subject: [PATCH] [wasm] Make the ModuleTranslationState ctor public. It's useful for consumers which don't want to translate a whole module, but just need translation of functions. --- cranelift/wasm/src/state/module_state.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cranelift/wasm/src/state/module_state.rs b/cranelift/wasm/src/state/module_state.rs index b2cbca77eb..306b17a068 100644 --- a/cranelift/wasm/src/state/module_state.rs +++ b/cranelift/wasm/src/state/module_state.rs @@ -19,7 +19,8 @@ pub struct ModuleTranslationState { } impl ModuleTranslationState { - pub(crate) fn new() -> Self { + /// Creates a new empty ModuleTranslationState. + pub fn new() -> Self { ModuleTranslationState { wasm_types: PrimaryMap::new(), }