LLVM 20.0.0git
|
Types represent the type of a value. More...
Modules | |
Integer Types | |
Functions in this section operate on integer types. | |
Floating Point Types | |
Function Types | |
Structure Types | |
These functions relate to LLVMTypeRef instances. | |
Sequential Types | |
Sequential types represents "arrays" of types. | |
Other Types | |
Functions | |
LLVMTypeKind | LLVMGetTypeKind (LLVMTypeRef Ty) |
Obtain the enumerated type of a Type instance. | |
LLVMBool | LLVMTypeIsSized (LLVMTypeRef Ty) |
Whether the type has a known size. | |
LLVMContextRef | LLVMGetTypeContext (LLVMTypeRef Ty) |
Obtain the context to which this type instance is associated. | |
void | LLVMDumpType (LLVMTypeRef Val) |
Dump a representation of a type to stderr. | |
char * | LLVMPrintTypeToString (LLVMTypeRef Val) |
Return a string representation of the type. | |
Types represent the type of a value.
Types are associated with a context instance. The context internally deduplicates types so there is only 1 instance of a specific type alive at a time. In other words, a unique type is shared among all consumers within a context.
A Type in the C API corresponds to llvm::Type.
Types have the following hierarchy:
types: integer type real type function type sequence types: array type pointer type vector type void type label type opaque type
void LLVMDumpType | ( | LLVMTypeRef | Val | ) |
Dump a representation of a type to stderr.
Definition at line 642 of file Core.cpp.
References llvm::errs(), llvm::BasicBlock::print(), and unwrap().
LLVMContextRef LLVMGetTypeContext | ( | LLVMTypeRef | Ty | ) |
Obtain the context to which this type instance is associated.
Definition at line 638 of file Core.cpp.
References unwrap(), and llvm::wrap().
LLVMTypeKind LLVMGetTypeKind | ( | LLVMTypeRef | Ty | ) |
Obtain the enumerated type of a Type instance.
Definition at line 585 of file Core.cpp.
References llvm::Type::ArrayTyID, llvm::Type::BFloatTyID, llvm::Type::DoubleTyID, llvm::Type::FixedVectorTyID, llvm::Type::FloatTyID, llvm::Type::FP128TyID, llvm::Type::FunctionTyID, getTypeID(), llvm::Type::HalfTyID, llvm::Type::IntegerTyID, llvm::Type::LabelTyID, llvm_unreachable, LLVMArrayTypeKind, LLVMBFloatTypeKind, LLVMDoubleTypeKind, LLVMFloatTypeKind, LLVMFP128TypeKind, LLVMFunctionTypeKind, LLVMHalfTypeKind, LLVMIntegerTypeKind, LLVMLabelTypeKind, LLVMMetadataTypeKind, LLVMPointerTypeKind, LLVMPPC_FP128TypeKind, LLVMScalableVectorTypeKind, LLVMStructTypeKind, LLVMTargetExtTypeKind, LLVMTokenTypeKind, LLVMVectorTypeKind, LLVMVoidTypeKind, LLVMX86_AMXTypeKind, LLVMX86_FP80TypeKind, llvm::Type::MetadataTyID, llvm::Type::PointerTyID, llvm::Type::PPC_FP128TyID, llvm::Type::ScalableVectorTyID, llvm::Type::StructTyID, llvm::Type::TargetExtTyID, llvm::Type::TokenTyID, llvm::Type::TypedPointerTyID, unwrap(), llvm::Type::VoidTyID, llvm::Type::X86_AMXTyID, and llvm::Type::X86_FP80TyID.
char * LLVMPrintTypeToString | ( | LLVMTypeRef | Val | ) |
Return a string representation of the type.
Use LLVMDisposeMessage to free the string.
Definition at line 646 of file Core.cpp.
References llvm::raw_ostream::flush(), llvm::BasicBlock::print(), and unwrap().
LLVMBool LLVMTypeIsSized | ( | LLVMTypeRef | Ty | ) |
Whether the type has a known size.
Things that don't have a size are abstract types, labels, and void.a
Definition at line 633 of file Core.cpp.
References unwrap().