Skip to content

Commit

Permalink
fix indentation of llvmcall docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Oct 23, 2015
1 parent 18af6f7 commit e255b5a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
18 changes: 9 additions & 9 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,18 @@ keywords[:ccall] = doc"""
keywords[:llvmcall] = doc"""
llvmcall(IR::String, ReturnType, (ArgumentType1, ...), ArgumentValue1, ...)
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.
"""

keywords[:begin] = doc"""
`begin...end` denotes a block of code.
Expand Down
11 changes: 5 additions & 6 deletions doc/stdlib/c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,12 @@
****************


.. 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.).
.. Docstring generated from Julia source
Note that the argument type tuple must be a literal tuple, and not a tuple-valued variable or expression.
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.).

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)``\ .
Note that the argument type tuple must be a literal tuple, and not a tuple-valued variable or expression.

See ``test/llvmcall.jl`` for usage examples.
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.

5 comments on commit e255b5a

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why calling make julia-genstdlib didn't automatically overwrite the text in doc/stdlib/c.rst but it didn't – I had to do this by hand. This whole doc system is such a mess right now.

@yuyichao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to have the function signature at all?

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I have no idea what happened here.

@MichaelHatherly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs the signature above the docstring:

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

Adding that and regenerating seems to work fine for me locally.

@ihnorton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc889b0

Please sign in to comment.