LLVM 22.0.0git

This modules provide an interface to libLLVMCore, which implements the LLVM intermediate representation as well as other related types and utilities. More...

Collaboration diagram for Core:

Topics

 Comdats
 Types and Enumerations
 Contexts
 Contexts are execution states for the core LLVM IR system.
 Modules
 Modules represent the top-level structure in an LLVM program.
 Types
 Types represent the type of a value.
 Values
 The bulk of LLVM's object model consists of values, which comprise a very rich type hierarchy.
 Operand Bundles
 Functions in this group operate on LLVMOperandBundleRef instances that correspond to llvm::OperandBundleDef instances.
 Basic Block
 A basic block represents a single entry single exit section of code.
 Instructions
 Functions in this group relate to the inspection and manipulation of individual instructions.
 Pass Managers
 Debug Information
 This file declares the C API endpoints for generating DWARF Debug Info.
 IR Reader
 Linker
 New Pass Manager

Functions

LLVM_C_ABI void LLVMShutdown (void)
 Deallocate and destroy all ManagedStatic variables.
LLVM_C_ABI void LLVMGetVersion (unsigned *Major, unsigned *Minor, unsigned *Patch)
 Return the major, minor, and patch version of LLVM.
LLVM_C_ABI charLLVMCreateMessage (const char *Message)
LLVM_C_ABI void LLVMDisposeMessage (char *Message)
LLVM_C_ABI LLVMBool LLVMLoadLibraryPermanently (const char *Filename)
 This function permanently loads the dynamic library at the given path.
LLVM_C_ABI void LLVMParseCommandLineOptions (int argc, const char *const *argv, const char *Overview)
 This function parses the given arguments using the LLVM command line parser.
LLVM_C_ABI void * LLVMSearchForAddressOfSymbol (const char *symbolName)
 This function will search through all previously loaded dynamic libraries for the symbol symbolName.
LLVM_C_ABI void LLVMAddSymbol (const char *symbolName, void *symbolValue)
 This functions permanently adds the symbol symbolName with the value symbolValue.

Detailed Description

This modules provide an interface to libLLVMCore, which implements the LLVM intermediate representation as well as other related types and utilities.

Many exotic languages can interoperate with C code but have a harder time with C++ due to name mangling. So in addition to C, this interface enables tools written in such languages.

Function Documentation

◆ LLVMAddSymbol()

LLVM_C_ABI void LLVMAddSymbol ( const char * symbolName,
void * symbolValue )

This functions permanently adds the symbol symbolName with the value symbolValue.

These symbols are searched before any libraries.

See also
sys::DynamicLibrary::AddSymbol()

Definition at line 251 of file DynamicLibrary.cpp.

References llvm::sys::DynamicLibrary::AddSymbol().

◆ LLVMCreateMessage()

LLVM_C_ABI char * LLVMCreateMessage ( const char * Message)

Definition at line 84 of file Core.cpp.

Referenced by LLVMGetDiagInfoDescription().

◆ LLVMDisposeMessage()

LLVM_C_ABI void LLVMDisposeMessage ( char * Message)

Definition at line 88 of file Core.cpp.

◆ LLVMGetVersion()

LLVM_C_ABI void LLVMGetVersion ( unsigned * Major,
unsigned * Minor,
unsigned * Patch )

Return the major, minor, and patch version of LLVM.

The version components are returned via the function's three output parameters or skipped if a NULL pointer was supplied.

Definition at line 73 of file Core.cpp.

◆ LLVMLoadLibraryPermanently()

LLVM_C_ABI LLVMBool LLVMLoadLibraryPermanently ( const char * Filename)

This function permanently loads the dynamic library at the given path.

It is safe to call this function multiple times for the same library.

See also
sys::DynamicLibrary::LoadLibraryPermanently()

Definition at line 243 of file DynamicLibrary.cpp.

References llvm::sys::DynamicLibrary::LoadLibraryPermanently().

◆ LLVMParseCommandLineOptions()

LLVM_C_ABI void LLVMParseCommandLineOptions ( int argc,
const char *const * argv,
const char * Overview )

This function parses the given arguments using the LLVM command line parser.

Note that the only stable thing about this function is its signature; you cannot rely on any particular set of command line arguments being interpreted the same way across LLVM versions.

See also
llvm::cl::ParseCommandLineOptions()

Definition at line 2852 of file CommandLine.cpp.

References llvm::nulls(), and llvm::cl::ParseCommandLineOptions().

◆ LLVMSearchForAddressOfSymbol()

LLVM_C_ABI void * LLVMSearchForAddressOfSymbol ( const char * symbolName)

This function will search through all previously loaded dynamic libraries for the symbol symbolName.

If it is found, the address of that symbol is returned. If not, null is returned.

See also
sys::DynamicLibrary::SearchForAddressOfSymbol()

Definition at line 247 of file DynamicLibrary.cpp.

References llvm::sys::DynamicLibrary::SearchForAddressOfSymbol().

◆ LLVMShutdown()

LLVM_C_ABI void LLVMShutdown ( void )

Deallocate and destroy all ManagedStatic variables.

See also
llvm::llvm_shutdown
ManagedStatic

Definition at line 67 of file Core.cpp.

References llvm::llvm_shutdown().