LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Modules | Functions
Types
Collaboration diagram for Types:

Modules

 Integer Types
 
 Floating Point Types
 
 Function Types
 
 Structure Types
 
 Sequential Types
 
 Other Types
 

Functions

LLVMTypeKind LLVMGetTypeKind (LLVMTypeRef Ty)
 
LLVMBool LLVMTypeIsSized (LLVMTypeRef Ty)
 
LLVMContextRef LLVMGetTypeContext (LLVMTypeRef Ty)
 
void LLVMDumpType (LLVMTypeRef Val)
 
char * LLVMPrintTypeToString (LLVMTypeRef Val)
 

Detailed Description

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

Function Documentation

void LLVMDumpType ( LLVMTypeRef  Val)

Dump a representation of a type to stderr.

See Also
llvm::Type::dump()

Definition at line 223 of file Core.cpp.

References llvm::unwrap().

LLVMContextRef LLVMGetTypeContext ( LLVMTypeRef  Ty)

Obtain the context to which this type instance is associated.

See Also
llvm::Type::getContext()

Definition at line 219 of file Core.cpp.

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

LLVMTypeKind LLVMGetTypeKind ( LLVMTypeRef  Ty)
char* LLVMPrintTypeToString ( LLVMTypeRef  Val)

Return a string representation of the type. Use LLVMDisposeMessage to free the string.

See Also
llvm::Type::print()

Definition at line 227 of file Core.cpp.

References llvm::raw_ostream::flush(), llvm::LibFunc::strdup, and llvm::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

See Also
llvm::Type::isSized()

Definition at line 214 of file Core.cpp.

References llvm::unwrap().