Skip to content

Commit

Permalink
Add llvmcall signature to doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Oct 24, 2015
1 parent 94b2b20 commit cc889b0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/stdlib/c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,15 @@
LLVM Interface
****************

.. function:: llvmcall(IR::String, ReturnType, (ArgumentType1, ...), ArgumentValue1, ...)

.. Docstring generated from Julia source
.. Docstring generated from Julia source
Call LLVM IR string in the first argument. Similar to an LLVM function ``define`` block, arguments are available as consecutive unnamed SSA variables (%0, %1, etc.).

Call LLVM IR string in the first argument. Similar to an LLVM function ``define`` block, arguments are available as consecutive unnamed SSA variables (%0, %1, etc.).
Note that the argument type tuple must be a literal tuple, and not a tuple-valued variable or expression.

Note that the argument type tuple must be a literal tuple, and not a tuple-valued variable or expression.
Each ``ArgumentValue`` to ``llvmcall`` will be converted to the corresponding ``ArgumentType``\ , by automatic insertion of calls to ``unsafe_convert(ArgumentType, cconvert(ArgumentType, ArgumentValue))``\ . (see also the documentation for each of these functions for further details). In most cases, this simply results in a call to ``convert(ArgumentType, ArgumentValue)``\ .

Each ``ArgumentValue`` to ``llvmcall`` will be converted to the corresponding ``ArgumentType``\ , by automatic insertion of calls to ``unsafe_convert(ArgumentType, cconvert(ArgumentType, ArgumentValue))``\ . (see also the documentation for each of these functions for further details). In most cases, this simply results in a call to ``convert(ArgumentType, ArgumentValue)``\ .
See ``test/llvmcall.jl`` for usage examples.

See ``test/llvmcall.jl`` for usage examples.

0 comments on commit cc889b0

Please sign in to comment.