Add docstring documentation to all llvm.core classes.
Some classes have docstrings, and lack rST docs (e.g. Module), few others vice versa. It's unclear what is the best way to deal with this. IMHO, docstrings should prevail, i.e. existing docs would rather be moved to docstings. Anyway, for now just make sure that users don't miss documentation, even if it's just list of classmembers.
This commit is contained in:
parent
d74ff4dc2b
commit
d36cd1dbc7
18 changed files with 122 additions and 0 deletions
|
|
@ -56,3 +56,10 @@ Add an attribute ``attr`` to the argument, from the set listed above.
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Remove the attribute ``attr`` of the argument.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Argument
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -28,3 +28,10 @@ A ``Type`` object representing the type of the element of the array.
|
|||
[read-only]
|
||||
|
||||
The number of elements in the array.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.ArrayType
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -42,3 +42,10 @@ The parent function of this basicblock.
|
|||
~~~~~~~~~~~~~~~~
|
||||
|
||||
A list of instructions in this basicblock.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.BasicBlock
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -409,3 +409,10 @@ positioned.
|
|||
~~~~~~~~~
|
||||
|
||||
Deprecated. Same as ``basic_block``
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Builder
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -354,3 +354,9 @@ some examples:
|
|||
|
||||
assert isinstance(k1, ConstantInt) assert isinstance(k2, ConstantArray)
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Constant
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -149,3 +149,10 @@ function bodies.
|
|||
|
||||
Verifies the function. See `LLVM
|
||||
docs <http://llvm.org/docs/Passes.html#verify>`_.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Function
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -46,3 +46,10 @@ the function. Used like this:
|
|||
Type.int(), Type.int() ] ) for arg in func_type.args: assert arg.kind
|
||||
== TYPE_INTEGER assert arg == Type.int() assert func_type.arg_count
|
||||
== len(func_type.args)
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.FunctionType
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -95,3 +95,9 @@ A power-of-2 integer indicating the boundary to align to.
|
|||
|
||||
The module object to which this global belongs to.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.GlobalValue
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -40,3 +40,10 @@ class, or by using the static method ``GlobalVariable.new``.
|
|||
# list all global variables in a module
|
||||
for gv in module_obj.global_variables: print gv.name, "of type",
|
||||
gv.type
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.GlobalVariable
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -240,3 +240,10 @@ Properties
|
|||
|
||||
The predicate of the compare instruction, one of the ``ICMP_*`` or
|
||||
``FCMP_*`` constants.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Instruction
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -21,3 +21,10 @@ Properties
|
|||
[read-only]
|
||||
|
||||
The width of the integer type, in number of bits.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.IntegerType
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -20,3 +20,10 @@ Modules are created using the static method ``Module.new``:
|
|||
|
||||
# create a module
|
||||
my_module = Module.new('my_module')
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Module
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -29,3 +29,10 @@ The address space of the pointer.
|
|||
|
||||
A `Type <llvm.core.Type.html>`_ object representing the type of the
|
||||
value pointed to.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.PointerType
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
llvm.core.StructType
|
||||
====================
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.StructType
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -126,3 +126,10 @@ Example:
|
|||
|
||||
assert Type.int().kind == TYPE_INTEGER assert
|
||||
Type.void().kind == TYPE_VOID
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Type
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -37,3 +37,10 @@ The list of operands (values, of type
|
|||
|
||||
The number of operands that this value referes to. Same as
|
||||
``len(uses.operands)`` but faster if you just want the count.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.User
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -63,3 +63,10 @@ representation.
|
|||
``Value`` objects can be compared for equality. Internally, this
|
||||
converts both arguments into their LLVM assembly representations and
|
||||
compares the resultant strings.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.Value
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
|
|
@ -29,3 +29,10 @@ element of the vector.
|
|||
[read-only]
|
||||
|
||||
The number of elements in the vector.
|
||||
|
||||
|
||||
Automatically Generated Documentation
|
||||
-------------------------------------
|
||||
.. autoclass:: llvm.core.VectorType
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue