Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TomBebbington/llvm-rs
/ functions
Functions
162 in github.com/TomBebbington/llvm-rs
⨍
Functions
162
◇
Types & classes
39
↓ 10 callers
Function
with_cstr
(text: &str, cb: C)
src/util.rs:23
↓ 8 callers
Method
add_function
Add a function to the module with the name given.
src/module.rs:100
↓ 8 callers
Function
ptr_to_null
(ptr: *mut P)
src/util.rs:41
↓ 7 callers
Method
append
Add a basic block with the name given to the function and return it.
src/value.rs:228
↓ 7 callers
Method
position_at_end
Position the builder at the end of `block`.
src/builder.rs:50
↓ 6 callers
Method
add_attributes
Add all the attributes given to this argument.
src/value.rs:103
↓ 6 callers
Method
build_ret
Build an instruction that returns from the function with `value`.
src/builder.rs:58
↓ 5 callers
Method
get_type
Returns the type of this value
src/value.rs:78
↓ 5 callers
Function
to_str
(text: *mut c_char)
src/util.rs:29
↓ 4 callers
Method
compile
Compile the module into an object file at the given location. Note that this uses the LLVM tool `llc` to do this, which may or may not be installed o
src/module.rs:172
↓ 4 callers
Method
verify
Verify that the module is safe to run, returning a string detailing the error when an error occurs.
src/module.rs:156
↓ 4 callers
Method
with_function
Run the closure `cb` with the machine code for the function `function`. If the function takes multiple arguments, these should be wrapped in a tuple
src/engine.rs:104
↓ 2 callers
Method
build_call
Build an instruction that calls the function `func` with the arguments `args`. This will return the return value of the function.
src/builder.rs:91
↓ 2 callers
Method
build_tail_call
Build an instruction that calls the function `func` with the arguments `args`. This will return the return value of the function.
src/builder.rs:101
↓ 2 callers
Method
get_context
(&self)
src/value.rs:286
↓ 2 callers
Method
get_type
Returns the type with the name given, or `None`` if no type with that name exists.
src/module.rs:113
↓ 2 callers
Method
remove_attribute
Remove an attribute from this argument.
src/value.rs:131
↓ 1 callers
Method
add_global
Add a global to the module with the given type and name.
src/module.rs:46
↓ 1 callers
Method
as_str
Returns the string representation of this target data.
src/target.rs:53
↓ 1 callers
Method
build_switch
Build an instruction that runs whichever block matches the value, or `default` if none of them matched it.
src/builder.rs:143
↓ 1 callers
Method
get_element
Returns the element of this pointer type.
src/types.rs:171
↓ 1 callers
Method
get_global
Returns a pointer to the global value given. This is marked as unsafe because the type cannot be guranteed to be the same as the type of the global v
src/engine.rs:70
↓ 1 callers
Method
get_signature
Returns the function signature representing this function's signature.
src/value.rs:242
↓ 1 callers
Method
is_float
Returns true if this type is any floating-point number.
src/types.rs:76
↓ 1 callers
Method
is_integer
Returns true if this type is an integer.
src/types.rs:71
↓ 1 callers
Function
n
(x: N)
examples/demo_3f.rs:15
↓ 1 callers
Method
set_initializer
Set the initial value of the global
src/value.rs:170
↓ 1 callers
Function
to_null_str
(text: *mut c_char)
src/util.rs:34
↓ 1 callers
Method
write_bitcode
Write this module's bitcode to the path given.
src/module.rs:90
Method
add_attribute
Add the attribute given to this argument.
src/value.rs:99
Method
add_global_alias
Add a global to the module with the given type and name.
src/module.rs:64
Method
add_global_in_address_space
Add a global variable to the module with the given type, name and initial value.
src/module.rs:52
Method
add_global_variable
Add a global variable to the module with the given type, name and initial value.
src/module.rs:58
Method
add_module
Add a module to the list of modules to interpret or compile.
src/engine.rs:27
Method
alignment_of
Returns the alignment of the type given in bytes.
src/target.rs:41
Method
blocks
Iterate through this function's basic blocks.
src/value.rs:234
Method
build_alloca
Build an instruction that allocates a pointer to fit the size of `ty` then returns this pointer.
src/builder.rs:68
Method
build_array_alloca
Build an instruction that allocates an array with the element type `elem` and the size `size`. The size of this array will be the size of `elem` time
src/builder.rs:64
Method
build_bit_cast
Build an instruction that casts a value into a certain type.
src/builder.rs:113
Method
build_br
Build an instruction that branches to the block `dest`.
src/builder.rs:81
Method
build_cmp
Build an instruction to compare the values `a` and `b` with the predicate / comparative operator `pred`.
src/builder.rs:164
Method
build_cond_br
Build an instruction that branches to `if_block` if `cond` evaluates to true, and `else_block` otherwise.
src/builder.rs:85
Method
build_extract_value
Build an instruction that extracts a value from an aggregate data value.
src/builder.rs:133
Method
build_free
Build an instruction that frees the `val`, which _MUST_ be a pointer that was returned from `build_alloca`.
src/builder.rs:73
Method
build_gep
Build an instruction that computes the address of a subelement of an aggregate data structure. Basically type-safe pointer arithmetic.
src/builder.rs:139
Method
build_insert_value
Build an instruction that inserts a value into an aggregate data value.
src/builder.rs:129
Method
build_int_to_ptr
Build an instruction to bitcast in integer into a pointer.
src/builder.rs:117
Method
build_ret_void
Build an instruction that returns from the function with void.
src/builder.rs:54
Method
build_select
Build an instruction that yields to `true_val` if `cond` is equal to `1`, and `false_val` otherwise.
src/builder.rs:109
Method
build_store
Build an instruction that store the value `val` in the pointer `ptr`.
src/builder.rs:77
Method
build_trunc
Build an instruction that truncates the high-order bits of value to fit into a certain type.
src/builder.rs:125
Method
build_zext
Build an instruction that zero extends its operand to the type `dest`.
src/builder.rs:121
Method
clone
Clone this module.
src/module.rs:121
Method
clone
(&self)
src/object.rs:72
Method
compile
(self, context: &'a Context)
src/compile.rs:44
Method
delete
Delete this basic block. This is unsafe because there should be no other reference to this, but this can't be guranteed using Rust semantics.
src/block.rs:62
Method
deref
(&self)
src/buffer.rs:28
Method
dispose
(ptr: LLVMMemoryBufferRef)
src/buffer.rs:44
Method
dispose
(ptr: LLVMTargetDataRef)
src/target.rs:67
Method
drop
(&mut self)
src/object.rs:57
Method
element_at
Computes the structure element that contains the byte offset for a target.
src/target.rs:45
Method
find_function
Attempt to find a function with the name given, or `None` if there wasn't a function with that name.
src/engine.rs:48
Method
find_global
Returns a pointer to the global value with the name given. This is marked as unsafe because the type cannot be guranteed to be the same as the type o
src/engine.rs:77
Method
fmt
(&self, fmt: &mut fmt::Formatter)
src/target.rs:60
Method
fmt
(&self, fmt: &mut fmt::Formatter)
src/object.rs:77
Method
from
(attr: LLVMAttribute)
src/value.rs:348
Method
from_generic
(value: &GenericValue, ctx: &Context)
src/engine.rs:206
Method
from_super
Attempt to cast the given super value into an instance of this type.
src/util.rs:10
Method
from_super
(value: &Value)
src/block.rs:19
Method
get
Get the type given as an LLVM type descriptor in the context given.
src/types.rs:35
Method
get
Get the pointer for this symbol.
src/object.rs:83
Method
get_constant
Returns true if this global is a constant.
src/value.rs:189
Method
get_description
Returns the description of this target.
src/target.rs:80
Method
get_elements
Returns the elements that make up this struct.
src/types.rs:108
Method
get_entry
Returns the entry block of this function or `None` if there is none.
src/value.rs:238
Method
get_first
Return the first instruction for this basic block.
src/block.rs:39
Method
get_function
Returns the function with the name given, or `None` if no function with that name exists.
src/module.rs:105
Method
get_function
Returns a pointer to the machine code for the function `function`. This is marked as unsafe because the types given as arguments and return could be
src/engine.rs:128
Method
get_global
Get the global with the name given, or `None` if no global with that name exists.
src/module.rs:70
Method
get_global
Get a reference to the global context. This is marked as unsafe because this can result in undefined behaviour in a multithreaded context if they all
src/context.rs:18
Method
get_initializer
Set the initial value of the global
src/value.rs:176
Method
get_last
Return the last instruction for this basic block.
src/block.rs:43
Method
get_length
Returns the number of elements in this vector type.
src/types.rs:229
Method
get_linkage
Returns the linkage type for this global
src/value.rs:149
Method
get_name
Returns the name of this value, or `None` if it lacks a name
src/value.rs:64
Method
get_name
Returns the name of this target.
src/target.rs:76
Method
get_params
Returns a vector of this signature's parameters' types.
src/types.rs:145
Method
get_parent
Return the enclosing method, or `None` if it is not attached to a method.
src/block.rs:31
Method
get_pointer_size
Returns the size of a pointer on the target.
src/target.rs:29
Method
get_return
Returns the type that this function returns.
src/types.rs:154
Method
get_size
Returns the size of the type in bytes.
src/types.rs:83
Method
get_target
Returns the target data of this module represented as a string
src/module.rs:141
Method
get_terminator
Return the terminator instruction for this basic block.
src/block.rs:35
Method
get_type
(ctx: &'a Context)
src/compile.rs:47
Method
get_width
Returns how long an integer of this type is, in bits.
src/types.rs:188
Method
has_asm_backend
Returns true if this target has an assembly generation backend implemented.
src/target.rs:84
Method
has_attribute
Returns true if this argument has the attribute given.
src/value.rs:112
Method
has_attributes
Returns true if this argument has all the attributes given.
src/value.rs:119
Method
has_jit
Returns true if this target supports JIT compilation.
src/target.rs:88
Method
has_target_machine
Returns true if this target has a target machine.
src/target.rs:92
next →
1–100 of 162, ranked by callers