Code cleanup. Remove reimplementation of type_to_llvm_ptr, use the one in intrinsics instead.

This commit is contained in:
Nick Lewycky
2020-05-26 15:22:24 -07:00
parent c2142752f8
commit b035ebada2
3 changed files with 20 additions and 29 deletions

View File

@ -55,10 +55,7 @@ fn wptype_to_type(ty: wasmparser::Type) -> WasmResult<Type> {
}
}
pub struct FuncTranslator {
ctx: Context,
}
// TODO: move this into inkwell.
fn const_zero(ty: BasicTypeEnum) -> BasicValueEnum {
match ty {
BasicTypeEnum::ArrayType(ty) => ty.const_zero().as_basic_value_enum(),
@ -70,6 +67,10 @@ fn const_zero(ty: BasicTypeEnum) -> BasicValueEnum {
}
}
pub struct FuncTranslator {
ctx: Context,
}
impl FuncTranslator {
pub fn new() -> Self {
Self {