Source

TyLLVM / main.ml

Full commit
let () =
  LLVM.print_context_module
    (LLVM.new_global
       ~link_type:(Some `Internal)
       ~constant:true
       "msg"
       (LLVM_types.array 13 (LLVM_types.int 8 None))
    );
  LLVM.print_context_module
    (LLVM.new_declaration
       (LLVM_types.int 32 None)
       "puts"
       [| LLVM_types.pointer (LLVM_types.int 8 None); LLVM_types.int 32 None |]
      ~link_type:(Some `External)
    )