LLVM 20.0.0git
Modules | Functions

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:

Modules

 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

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

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()

char * LLVMCreateMessage ( const char Message)

Definition at line 82 of file Core.cpp.

Referenced by LLVMGetDiagInfoDescription().

◆ LLVMDisposeMessage()

void LLVMDisposeMessage ( char Message)

Definition at line 86 of file Core.cpp.

◆ LLVMGetVersion()

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 71 of file Core.cpp.

◆ LLVMLoadLibraryPermanently()

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()

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 2834 of file CommandLine.cpp.

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

◆ LLVMSearchForAddressOfSymbol()

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()

void LLVMShutdown ( void  )

Deallocate and destroy all ManagedStatic variables.

See also
llvm::llvm_shutdown
ManagedStatic

Definition at line 65 of file Core.cpp.

References llvm::llvm_shutdown().