Parse names before we take the module

Otherwise when we try to parse the names there's no module with contents!
This commit is contained in:
Alex Crichton 2018-09-06 22:08:04 -07:00
parent fcfc3e32fe
commit e632dd3fda

View File

@ -1716,8 +1716,8 @@ impl<'a> Context<'a> {
}
fn gc(&mut self) -> Result<(), Error> {
let module = mem::replace(self.module, Module::default());
self.parse_wasm_names();
let module = mem::replace(self.module, Module::default());
let result = wasm_gc::Config::new()
.demangle(self.config.demangle)
.keep_debug(self.config.keep_debug || self.config.debug)