---
source: crates/mun_codegen/src/test.rs
assertion_line: 1080
expression: "\n pub fn main() {\n let a = [1,2,3,4,]\n }\n "
---
; == FILE IR (mod) =====================================
; ModuleID = 'mod'
source_filename = "mod"
%DispatchTable = type { i8** (i8*, i64, i8*)* }
%"[i32]" = type { i64, i64, i32 }
@allocatorHandle = external global i8*
@dispatchTable = external global %DispatchTable
@global_type_lookup_table = external global [1 x i64*]
define void @main() {
body:
%a = alloca %"[i32]"**, align 8
%new_array_ptr = load i8** (i8*, i64, i8*)*, i8** (i8*, i64, i8*)** getelementptr inbounds (%DispatchTable, %DispatchTable* @dispatchTable, i32 0, i32 0), align 8
%"[core::i32]_ptr" = load i64*, i64** getelementptr inbounds ([1 x i64*], [1 x i64*]* @global_type_lookup_table, i64 0, i64 0), align 8
%type_info_ptr_to_i8_ptr = bitcast i64* %"[core::i32]_ptr" to i8*
%allocator_handle = load i8*, i8** @allocatorHandle, align 8
%ref = call i8** %new_array_ptr(i8* %type_info_ptr_to_i8_ptr, i64 4, i8* %allocator_handle)
%"ref<[i32]>" = bitcast i8** %ref to %"[i32]"**
%"ref<[i32]>->data" = load %"[i32]"*, %"[i32]"** %"ref<[i32]>", align 8
%"ref<[i32]>->data->elements" = getelementptr inbounds %"[i32]", %"[i32]"* %"ref<[i32]>->data", i32 0, i32 2
%"ref<[i32]>->data->elements[0]" = getelementptr i32, i32* %"ref<[i32]>->data->elements", i64 0
store i32 1, i32* %"ref<[i32]>->data->elements[0]", align 4
%"ref<[i32]>->data->elements[1]" = getelementptr i32, i32* %"ref<[i32]>->data->elements", i64 1
store i32 2, i32* %"ref<[i32]>->data->elements[1]", align 4
%"ref<[i32]>->data->elements[2]" = getelementptr i32, i32* %"ref<[i32]>->data->elements", i64 2
store i32 3, i32* %"ref<[i32]>->data->elements[2]", align 4
%"ref<[i32]>->data->elements[3]" = getelementptr i32, i32* %"ref<[i32]>->data->elements", i64 3
store i32 4, i32* %"ref<[i32]>->data->elements[3]", align 4
%"ref<[i32]>->data1" = load %"[i32]"*, %"[i32]"** %"ref<[i32]>", align 8
%"ref<[i32]>->data1->length" = getelementptr inbounds %"[i32]", %"[i32]"* %"ref<[i32]>->data1", i32 0, i32 0
store i64 4, i64* %"ref<[i32]>->data1->length", align 4
store %"[i32]"** %"ref<[i32]>", %"[i32]"*** %a, align 8
ret void
}
; == GROUP IR (mod) ====================================
; ModuleID = 'group_name'
source_filename = "group_name"
%DispatchTable = type { i8** (i8*, i64, i8*)* }
@dispatchTable = global %DispatchTable zeroinitializer
@global_type_lookup_table = global [1 x i64*] zeroinitializer
@allocatorHandle = unnamed_addr global i8* null