libjuno 0.1.10

Library for JunoLang
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use inkwell::AddressSpace;

use crate::*;

use super::LLVMBackend;

impl<'ctx> LLVMBackend<'ctx> {
    pub(super) fn add_scanf(&mut self) {
        let i8ptr = self.context.ptr_type(AddressSpace::default());

        let ty = self.context
            .i8_type()
            .fn_type(&[i8ptr.into()], true);

        self.declare_builtin("scanf", ty);
    }
}