input:
fn add(a: i64, b: i64) -> i64 {
return a + b;
}
fn main() -> i64 {
let x = 2 + 3;
let y = add(x, 4);
return y * 2;
}
output:
; ModuleID = 'source'
source_filename = "source"
define i64 @add(i64 %0, i64 %1) {
entry:
%add = add i64 %0, %1
ret i64 %add
}
define i64 @main() {
entry:
%add_call = call i64 @add(i64 5, i64 4)
%mul = mul i64 %add_call, 2
ret i64 %mul
}
function calls poginput:
fn add(a: i64, b: i64) -> i64 {
return a + b;
}
fn main() -> i64 {
let x = 2 + 3;
let y = add(x, 4);
return y * 2;
}
output:
; ModuleID = 'source'
source_filename = "source"
define i64 @add(i64 %0, i64 %1) {
entry:
%add = add i64 %0, %1
ret i64 %add
}
define i64 @main() {
entry:
%add_call = call i64 @add(i64 5, i64 4)
%mul = mul i64 %add_call, 2
ret i64 %mul
}
function calls pog c++
#include <engine/graphics.h>
#include <engine/shared/config.h>
#include <engine/shared/protocol.h>
#include <engine/textrender.h>
#include <game/generated/client_data.h>
#include <game/generated/protocol.h>
#include <game/server/teams.h> /* this is the new one I added */
#include "killmessages.h"
#include <game/client/animstate.h>
#include <game/client/gameclient.h>
CGameWorld
inside teams.h though?