Fix using using the same vtable twice

This commit is contained in:
bjorn3 2019-04-27 18:49:13 +02:00
parent 421fe2e982
commit 27ea27e2e3

View File

@ -138,7 +138,12 @@ fn build_vtable<'a, 'tcx: 'a>(
false,
)
.unwrap();
fx.module.define_data(data_id, &data_ctx).unwrap();
match fx.module.define_data(data_id, &data_ctx) {
Ok(()) | Err(cranelift_module::ModuleError::DuplicateDefinition(_)) => {}
err => err.unwrap(),
}
data_id
}