LLVM 22.0.0git
llvm::orc::IRSymbolMapper Class Reference

Maps IR global values to their linker symbol names / flags. More...

#include "llvm/ExecutionEngine/Orc/Mangling.h"

Classes

struct  ManglingOptions

Public Types

using SymbolNameToDefinitionMap = std::map<SymbolStringPtr, GlobalValue *>

Static Public Member Functions

static LLVM_ABI void add (ExecutionSession &ES, const ManglingOptions &MO, ArrayRef< GlobalValue * > GVs, SymbolFlagsMap &SymbolFlags, SymbolNameToDefinitionMap *SymbolToDefinition=nullptr)
 Add mangled symbols for the given GlobalValues to SymbolFlags.

Detailed Description

Maps IR global values to their linker symbol names / flags.

This utility can be used when adding new IR globals in the JIT.

Definition at line 40 of file Mangling.h.

Member Typedef Documentation

◆ SymbolNameToDefinitionMap

Member Function Documentation

◆ add()

void llvm::orc::IRSymbolMapper::add ( ExecutionSession & ES,
const ManglingOptions & MO,
ArrayRef< GlobalValue * > GVs,
SymbolFlagsMap & SymbolFlags,
SymbolNameToDefinitionMap * SymbolToDefinition = nullptr )
static

Add mangled symbols for the given GlobalValues to SymbolFlags.

If a SymbolToDefinitionMap pointer is supplied then it will be populated with Name-to-GlobalValue* mappings. Note that this mapping is not necessarily one-to-one: thread-local GlobalValues, for example, may produce more than one symbol, in which case the map will contain duplicate values.

Definition at line 30 of file Mangling.cpp.

References assert(), llvm::cast(), llvm::dyn_cast(), llvm::ArrayRef< T >::empty(), llvm::orc::IRSymbolMapper::ManglingOptions::EmulatedTLS, llvm::JITSymbolFlags::fromGlobalValue(), G, and llvm::isa().


The documentation for this class was generated from the following files: