MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / toLLVMType

Function toLLVMType

lib/llvm/compiler.cpp:425–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425static LLVM::Type toLLVMType(LLVM::Context LLContext,
426 const ValType &ValType) noexcept {
427 switch (ValType.getCode()) {
428 case TypeCode::I32:
429 return LLContext.getInt32Ty();
430 case TypeCode::I64:
431 return LLContext.getInt64Ty();
432 case TypeCode::Ref:
433 case TypeCode::RefNull:
434 case TypeCode::V128:
435 return LLVM::Type::getVectorType(LLContext.getInt64Ty(), 2);
436 case TypeCode::F32:
437 return LLContext.getFloatTy();
438 case TypeCode::F64:
439 return LLContext.getDoubleTy();
440 default:
441 assumingUnreachable();
442 }
443}
444
445static LLVM::Type toLLVMType(LLVM::Context LLContext,
446 const AddressType AddrType) noexcept {

Callers 9

toLLVMTypeVectorFunction · 0.85
toLLVMRetsTypeFunction · 0.85
FunctionCompilerMethod · 0.85
compileMethod · 0.85
compileIndirectCallOpMethod · 0.85
compileCallRefOpMethod · 0.85
compileMethod · 0.85

Calls 8

toLLVMArgsTypeFunction · 0.85
toLLVMRetsTypeFunction · 0.85
getInt32TyMethod · 0.80
getInt64TyMethod · 0.80
getFloatTyMethod · 0.80
getDoubleTyMethod · 0.80
getParamTypesMethod · 0.80
getCodeMethod · 0.45

Tested by

no test coverage detected