Expand description
Functions in this group operate on constants expressions.
This module provides a set of functions and methods for operating on constants expressions within the LLVM framework.
The functions in this module allow for various operations and manipulations of constant values, such as obtaining the alignment or size of a type, performing arithmetic operations, and creating constant expressions. These operations are essential for low-level programming tasks that require precise control over memory layout and arithmetic behavior.
The module includes:
- Opcode Retrieval: Functions to get the opcode of a constant expression.
- Type Information: Functions to obtain the alignment and size of a type.
- Arithmetic Operations: Functions to perform negation, addition, subtraction, multiplication, and other arithmetic operations on constant values, with support for
NSW
(No Signed Wrap) andNUW
(No Unsigned Wrap) flags. - Logical Operations: Functions to perform logical NOT and XOR operations on constant values.
- Comparison Operations: Functions to perform integer and floating-point comparisons on constant values.
- Bitwise Operations: Functions to perform bitwise operations such as left shift and bit-cast on constant values.
- Pointer Operations: Functions to convert between pointers and integers, and to perform address space casts.
- Vector Operations: Functions to extract and insert elements in vector constants, and to create shuffle vector operations.
- Block Addressing: Functions to obtain the address of a basic block in a function.
These functions wrap the corresponding LLVM core library functions, providing a safe and idiomatic Rust interface for interacting with LLVM constants.