aboutsummaryrefslogtreecommitdiff
path: root/src/link
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2021-01-03 16:00:12 +0100
committerTimon Kruiper <timonkruiper@gmail.com>2021-01-03 17:39:30 +0100
commit0008bef1e643c190a12e13d99a21d5af7ebdaa1b (patch)
treef525e9fa6d4bbf431ac047ebc068399f4843b322 /src/link
parente095ebf31254bf5eeba9c07a2ad724e880626f01 (diff)
downloadzig-0008bef1e643c190a12e13d99a21d5af7ebdaa1b.tar.gz
zig-0008bef1e643c190a12e13d99a21d5af7ebdaa1b.zip
stage2: add support for integers in LLVM backend
Also adds support for simple operators, like add and subtract. The intcast and bitcast instruction also have been implemented. Linking with libc also works, so we can now generate working executables! `zig build-exe example.zig -fLLVM -lc`: ``` fn add(a: i32, b: i32) i32 { return a + b; } export fn main() c_int { var a: i32 = -5; const x = add(a, 7); var y = add(2, 0); y -= x; return y; } ```
Diffstat (limited to 'src/link')
0 files changed, 0 insertions, 0 deletions