Wrap all LLVMGetElementType uses

This commit is contained in:
gingerBill
2022-08-09 21:17:32 +01:00
parent 0655260378
commit 812823cad8
5 changed files with 26 additions and 17 deletions
+11
View File
@@ -2293,6 +2293,17 @@ void lb_emit_if(lbProcedure *p, lbValue cond, lbBlock *true_block, lbBlock *fals
}
gb_inline LLVMTypeRef OdinLLVMGetInternalElementType(LLVMTypeRef type) {
return LLVMGetElementType(type);
}
LLVMTypeRef OdinLLVMGetArrayElementType(LLVMTypeRef type) {
GB_ASSERT(lb_is_type_kind(type, LLVMArrayTypeKind));
return OdinLLVMGetInternalElementType(type);
}
LLVMTypeRef OdinLLVMGetVectorElementType(LLVMTypeRef type) {
GB_ASSERT(lb_is_type_kind(type, LLVMVectorTypeKind));
return OdinLLVMGetInternalElementType(type);
}
LLVMValueRef OdinLLVMBuildTransmute(lbProcedure *p, LLVMValueRef val, LLVMTypeRef dst_type) {