mun_codegen 0.3.0

LLVM IR code generation for Mun
---
source: crates/mun_codegen/src/test.rs
expression: "\n    pub fn add(a: f32, b: f32) -> f32 { a + b }\n    pub fn subtract(a: f32, b: f32) -> f32 { a - b }\n    pub fn multiply(a: f32, b: f32) -> f32 { a * b }\n    pub fn divide(a: f32, b: f32) -> f32 { a / b }\n    pub fn remainder(a: f32, b: f32) -> f32 { a % b }\n                        "
---
; == FILE IR (mod) =====================================
; ModuleID = 'mod'
source_filename = "mod"

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

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

define float @add(float %0, float %1) {
body:
  %add = fadd float %0, %1
  ret float %add
}

define float @subtract(float %0, float %1) {
body:
  %sub = fsub float %0, %1
  ret float %sub
}

define float @multiply(float %0, float %1) {
body:
  %mul = fmul float %0, %1
  ret float %mul
}

define float @divide(float %0, float %1) {
body:
  %div = fdiv float %0, %1
  ret float %div
}

define float @remainder(float %0, float %1) {
body:
  %rem = frem float %0, %1
  ret float %rem
}

; == GROUP IR (mod) ====================================
; ModuleID = 'group_name'
source_filename = "group_name"

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

@"type_info::<core::f32>::name" = private unnamed_addr constant [10 x i8] c"core::f32\00"
@"type_info::<core::f32>" = private unnamed_addr constant <{ [16 x i8], i8*, [48 x i8] }> <{ [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), [48 x i8] c" \00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" }>
@global_type_table = constant [1 x %"mun_codegen::ir::types::TypeInfo"*] [%"mun_codegen::ir::types::TypeInfo"* @"type_info::<core::f32>"]