Does anyone have a working example that calls printf via llvmcall?
I realise I'm uncomfortably inbetween llvmdev and julia-users, but I'm
asking here first because I suspect my limitations are still more
julia-related.
In particular,
julia> g() = Base.llvmcall("""
call i32 (i8*, ...)* @printf(i8* c"hello world\00")
ret""",
Void, Tuple{})
g (generic function with 2 methods)
julia> g()
ERROR: error compiling g: Failed to parse LLVM Assembly:
julia: llvmcall:3:35: error: expected string
call i32 (i8*, ...)* @printf(i8* c"hello world
^
seems like it's *almost* there...?
Thanks,
Andrew
(I suspect I also need something other than @printf, like
IntrinsicsX86.printf or something, but I can't find where I saw an example
like that... Related, declare doesn't seem to be accepted, or assignment
to global vsariables. But I am completely new to all this...)