Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(codegen): alignment of struct fields #285

Merged
merged 1 commit into from
Oct 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/mun_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ categories = ["Game development", "Mun"]
[dependencies]
abi = { version = "=0.2.0", path = "../mun_abi", package = "mun_abi" }
hir = { version = "=0.2.0", path = "../mun_hir", package = "mun_hir" }
itertools = "0.9.0"
mun_codegen_macros = { path = "../mun_codegen_macros", package = "mun_codegen_macros" }
mun_target = { version = "=0.2.0", path = "../mun_target" }
mun_lld = { version = "=80.0.0", path = "../mun_lld" }
Expand Down
8 changes: 4 additions & 4 deletions crates/mun_codegen/src/code_gen/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@ fn gen_get_info_fn<'ink>(
};

// Get access to the structs internals
let symbols_addr = unsafe { builder.build_struct_gep(result_ptr, 0, "symbols") };
let dispatch_table_addr = unsafe { builder.build_struct_gep(result_ptr, 1, "dispatch_table") };
let dependencies_addr = unsafe { builder.build_struct_gep(result_ptr, 2, "dependencies") };
let symbols_addr = unsafe { builder.build_struct_gep(result_ptr, 1, "symbols") };
let dispatch_table_addr = unsafe { builder.build_struct_gep(result_ptr, 3, "dispatch_table") };
let dependencies_addr = unsafe { builder.build_struct_gep(result_ptr, 5, "dependencies") };
let num_dependencies_addr =
unsafe { builder.build_struct_gep(result_ptr, 3, "num_dependencies") };
unsafe { builder.build_struct_gep(result_ptr, 7, "num_dependencies") };

// Assign the struct values one by one.
builder.build_store(symbols_addr, module_info.as_value(context).value);
Expand Down
1 change: 1 addition & 0 deletions crates/mun_codegen/src/ir/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::value::{AsValue, IrValueContext, SizedValueType, TransparentValue, Value};
use itertools::Itertools;
use mun_codegen_macros::AsValue;

impl<'ink> TransparentValue<'ink> for abi::Guid {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: f32, b: f32) -> f32 { a + b }\npub fn subtract(a: f32
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::f32>::name" = private unnamed_addr constant [10 x i8] c"core::f32\00"
@"type_info::<core::f32>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"P\19b7\A8k\F2\81P\FB\83\F5P\B0\82!", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::f32>::name", i32 0, i32 0), i32 32, i8 4, i8 0 }
@"type_info::<core::f32>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"P\19b7\A8k\F2\81P\FB\83\F5P\B0\82!", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::f32>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 32, [0 x i64] zeroinitializer, i8 4, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::f32>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: f64, b: f64) -> f64 { a + b }\npub fn subtract(a: f64
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::f64>::name" = private unnamed_addr constant [10 x i8] c"core::f64\00"
@"type_info::<core::f64>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"`\DBF\9C?YJ%G\AD4\9F\D5\92%A", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::f64>::name", i32 0, i32 0), i32 64, i8 8, i8 0 }
@"type_info::<core::f64>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"`\DBF\9C?YJ%G\AD4\9F\D5\92%A", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::f64>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 64, [0 x i64] zeroinitializer, i8 8, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::f64>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: i128, b: i128) -> i128 { a + b }\npub fn subtract(a:
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::i128>::name" = private unnamed_addr constant [11 x i8] c"core::i128\00"
@"type_info::<core::i128>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"\BDkp\09RRM\EBc\02\A0\DB47\A7\E3", i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"type_info::<core::i128>::name", i32 0, i32 0), i32 128, i8 8, i8 0 }
@"type_info::<core::i128>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"\BDkp\09RRM\EBc\02\A0\DB47\A7\E3", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"type_info::<core::i128>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 128, [0 x i64] zeroinitializer, i8 8, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::i128>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: i16, b: i16) -> i16 { a + b }\npub fn subtract(a: i16
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::i16>::name" = private unnamed_addr constant [10 x i8] c"core::i16\00"
@"type_info::<core::i16>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"\05\CD|\F8Bv\D8\B1\E8\8B\8C\D8\8D\B5\89\B0", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i16>::name", i32 0, i32 0), i32 16, i8 2, i8 0 }
@"type_info::<core::i16>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"\05\CD|\F8Bv\D8\B1\E8\8B\8C\D8\8D\B5\89\B0", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i16>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 16, [0 x i64] zeroinitializer, i8 2, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::i16>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: i32, b: i32) -> i32 { a + b }\npub fn subtract(a: i32
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::i32>::name" = private unnamed_addr constant [10 x i8] c"core::i32\00"
@"type_info::<core::i32>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"\17yzt\19\D62\17\D25\95C\17\88[\FA", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i32>::name", i32 0, i32 0), i32 32, i8 4, i8 0 }
@"type_info::<core::i32>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"\17yzt\19\D62\17\D25\95C\17\88[\FA", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i32>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 32, [0 x i64] zeroinitializer, i8 4, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::i32>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: i64, b: i64) -> i64 { a + b }\npub fn subtract(a: i64
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::i64>::name" = private unnamed_addr constant [10 x i8] c"core::i64\00"
@"type_info::<core::i64>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"G\13;t\97j8\18\D7M\83`\1D\C8\19%", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i64>::name", i32 0, i32 0), i32 64, i8 8, i8 0 }
@"type_info::<core::i64>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"G\13;t\97j8\18\D7M\83`\1D\C8\19%", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::i64>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 64, [0 x i64] zeroinitializer, i8 8, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::i64>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: i8, b: i8) -> i8 { a + b }\npub fn subtract(a: i8, b:
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::i8>::name" = private unnamed_addr constant [9 x i8] c"core::i8\00"
@"type_info::<core::i8>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"\EF\C4\B1Z\E7\12\B1\91q\F1\0B\80U\FC\A6\0F", i8* getelementptr inbounds ([9 x i8], [9 x i8]* @"type_info::<core::i8>::name", i32 0, i32 0), i32 8, i8 1, i8 0 }
@"type_info::<core::i8>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"\EF\C4\B1Z\E7\12\B1\91q\F1\0B\80U\FC\A6\0F", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @"type_info::<core::i8>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 8, [0 x i64] zeroinitializer, i8 1, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::i8>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: u128, b: u128) -> u128 { a + b }\npub fn subtract(a:
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::u128>::name" = private unnamed_addr constant [11 x i8] c"core::u128\00"
@"type_info::<core::u128>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"\E67\1BU\E9k\95\93d\14}\1C\96S\95\F0", i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"type_info::<core::u128>::name", i32 0, i32 0), i32 128, i8 8, i8 0 }
@"type_info::<core::u128>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"\E67\1BU\E9k\95\93d\14}\1C\96S\95\F0", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"type_info::<core::u128>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 128, [0 x i64] zeroinitializer, i8 8, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::u128>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: u16, b: u16) -> u16 { a + b }\npub fn subtract(a: u16
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::u16>::name" = private unnamed_addr constant [10 x i8] c"core::u16\00"
@"type_info::<core::u16>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"0\01\BC\BBK\E0\F2\7F&l\01\CD|q\F2\B3", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::u16>::name", i32 0, i32 0), i32 16, i8 2, i8 0 }
@"type_info::<core::u16>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"0\01\BC\BBK\E0\F2\7F&l\01\CD|q\F2\B3", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::u16>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 16, [0 x i64] zeroinitializer, i8 2, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::u16>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: u32, b: u32) -> u32 { a + b }\npub fn subtract(a: u32
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::u32>::name" = private unnamed_addr constant [10 x i8] c"core::u32\00"
@"type_info::<core::u32>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"daz5d\A6\BE\88\81=&Y\A1+\C6\1D", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::u32>::name", i32 0, i32 0), i32 32, i8 4, i8 0 }
@"type_info::<core::u32>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"daz5d\A6\BE\88\81=&Y\A1+\C6\1D", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::u32>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 32, [0 x i64] zeroinitializer, i8 4, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::u32>"]

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: "pub fn add(a: u64, b: u64) -> u64 { a + b }\npub fn subtract(a: u64
; ModuleID = 'main.mun'
source_filename = "main.mun"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@global_type_table = external global [1 x %"mun_codegen::ir::types::TypeInfo"*]

Expand Down Expand Up @@ -45,9 +45,9 @@ body:
; ModuleID = 'group_name'
source_filename = "group_name"

%"mun_codegen::ir::types::TypeInfo" = type { [16 x i8], i8*, i32, i8, i8 }
%"mun_codegen::ir::types::TypeInfo" = type <{ [0 x i64], [16 x i8], [0 x i64], i8*, [0 x i64], i32, [0 x i64], i8, [0 x i64], i8, [1 x i16] }>

@"type_info::<core::u64>::name" = private unnamed_addr constant [10 x i8] c"core::u64\00"
@"type_info::<core::u64>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" { [16 x i8] c"\A6\E7g \D1\8B\1Aq`\1F\1E\07\BB5@q", i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::u64>::name", i32 0, i32 0), i32 64, i8 8, i8 0 }
@"type_info::<core::u64>" = private unnamed_addr constant %"mun_codegen::ir::types::TypeInfo" <{ [0 x i64] zeroinitializer, [16 x i8] c"\A6\E7g \D1\8B\1Aq`\1F\1E\07\BB5@q", [0 x i64] zeroinitializer, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @"type_info::<core::u64>::name", i32 0, i32 0), [0 x i64] zeroinitializer, i32 64, [0 x i64] zeroinitializer, i8 8, [0 x i64] zeroinitializer, i8 0, [1 x i16] zeroinitializer }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::u64>"]

Loading