LLVM 19.0.0git
Modules | Functions

This section contains APIs for interacting with LLVMValueRef that correspond to llvm::Constant instances. More...

Collaboration diagram for Constants:

Modules

 Scalar constants
 Functions in this group model LLVMValueRef instances that correspond to constants referring to scalar types.
 
 Composite Constants
 Functions in this group operate on composite constants.
 
 Constant Expressions
 Functions in this group correspond to APIs on llvm::ConstantExpr.
 
 Global Values
 This group contains functions that operate on global values.
 
 Global Variables
 This group contains functions that operate on global variable values.
 
 Global Aliases
 This group contains function that operate on global alias values.
 
 Function values
 Functions in this group operate on LLVMValueRef instances that correspond to llvm::Function instances.
 

Functions

LLVMValueRef LLVMConstNull (LLVMTypeRef Ty)
 Obtain a constant value referring to the null instance of a type.
 
LLVMValueRef LLVMConstAllOnes (LLVMTypeRef Ty)
 Obtain a constant value referring to the instance of a type consisting of all ones.
 
LLVMValueRef LLVMGetUndef (LLVMTypeRef Ty)
 Obtain a constant value referring to an undefined value of a type.
 
LLVMValueRef LLVMGetPoison (LLVMTypeRef Ty)
 Obtain a constant value referring to a poison value of a type.
 
LLVMBool LLVMIsNull (LLVMValueRef Val)
 Determine whether a value instance is null.
 
LLVMValueRef LLVMConstPointerNull (LLVMTypeRef Ty)
 Obtain a constant that is a constant pointer pointing to NULL for a specified type.
 

Detailed Description

This section contains APIs for interacting with LLVMValueRef that correspond to llvm::Constant instances.

These functions will work for any LLVMValueRef in the llvm::Constant class hierarchy.

Function Documentation

◆ LLVMConstAllOnes()

LLVMValueRef LLVMConstAllOnes ( LLVMTypeRef  Ty)

Obtain a constant value referring to the instance of a type consisting of all ones.

This is only valid for integer types.

See also
llvm::Constant::getAllOnesValue()

Definition at line 1158 of file Core.cpp.

References llvm::Constant::getAllOnesValue(), llvm::unwrap(), and llvm::wrap().

◆ LLVMConstNull()

LLVMValueRef LLVMConstNull ( LLVMTypeRef  Ty)

Obtain a constant value referring to the null instance of a type.

See also
llvm::Constant::getNullValue()

Definition at line 1154 of file Core.cpp.

References llvm::Constant::getNullValue(), llvm::unwrap(), and llvm::wrap().

◆ LLVMConstPointerNull()

LLVMValueRef LLVMConstPointerNull ( LLVMTypeRef  Ty)

Obtain a constant that is a constant pointer pointing to NULL for a specified type.

Definition at line 1188 of file Core.cpp.

References llvm::ConstantPointerNull::get(), and llvm::wrap().

◆ LLVMGetPoison()

LLVMValueRef LLVMGetPoison ( LLVMTypeRef  Ty)

Obtain a constant value referring to a poison value of a type.

See also
llvm::PoisonValue::get()

Definition at line 1166 of file Core.cpp.

References llvm::PoisonValue::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMGetUndef()

LLVMValueRef LLVMGetUndef ( LLVMTypeRef  Ty)

Obtain a constant value referring to an undefined value of a type.

See also
llvm::UndefValue::get()

Definition at line 1162 of file Core.cpp.

References llvm::UndefValue::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMIsNull()

LLVMBool LLVMIsNull ( LLVMValueRef  Val)

Determine whether a value instance is null.

See also
llvm::Constant::isNullValue()

Definition at line 1174 of file Core.cpp.

References llvm::CallingConv::C, and llvm::unwrap().