Skip to content

Commit b65befd

Browse files
authored
Fix load type not initialized issue for LLVMBuildLoad2 (#1381)
Fix the issue introduced by #1202, clear the compilation warning when building wamrc based on LLVM 14/15.
1 parent 2178787 commit b65befd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/iwasm/compilation/aot_llvm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,11 +2735,13 @@ aot_load_const_from_table(AOTCompContext *comp_ctx, LLVMValueRef base,
27352735
/* Store the raw int bits of i32 const as a hex string */
27362736
snprintf(buf, sizeof(buf), "i32#%08" PRIX32, value->i32);
27372737
const_ptr_type = INT32_PTR_TYPE;
2738+
const_type = I32_TYPE;
27382739
break;
27392740
case VALUE_TYPE_I64:
27402741
/* Store the raw int bits of i64 const as a hex string */
27412742
snprintf(buf, sizeof(buf), "i64#%016" PRIX64, value->i64);
27422743
const_ptr_type = INT64_PTR_TYPE;
2744+
const_type = I64_TYPE;
27432745
break;
27442746
case VALUE_TYPE_F32:
27452747
/* Store the raw int bits of f32 const as a hex string */

0 commit comments

Comments
 (0)