LLVM 22.0.0git
llvm::Mangler Class Reference

#include "llvm/IR/Mangler.h"

Public Member Functions

LLVM_ABI void getNameWithPrefix (raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
 Print the appropriate prefix and the specified global variable's name.
LLVM_ABI void getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, bool CannotUsePrivateLabel) const

Static Public Member Functions

static LLVM_ABI void getNameWithPrefix (raw_ostream &OS, const Twine &GVName, const DataLayout &DL)
 Print the appropriate prefix and the specified name as the global variable name.
static LLVM_ABI void getNameWithPrefix (SmallVectorImpl< char > &OutName, const Twine &GVName, const DataLayout &DL)

Detailed Description

Definition at line 40 of file Mangler.h.

Member Function Documentation

◆ getNameWithPrefix() [1/4]

void Mangler::getNameWithPrefix ( raw_ostream & OS,
const GlobalValue * GV,
bool CannotUsePrivateLabel ) const

Print the appropriate prefix and the specified global variable's name.

If the global variable doesn't have a name, this fills in a unique name for the global.

Definition at line 121 of file Mangler.cpp.

References addByteCountSuffix(), assert(), llvm::CallingConv::C, llvm::Default, DL, llvm::dyn_cast_or_null(), llvm::GlobalValue::getAliaseeObject(), llvm::Function::getCallingConv(), llvm::GlobalValue::getDataLayout(), llvm::Function::getFunctionType(), llvm::Value::getName(), getNameWithPrefixImpl(), llvm::FunctionType::getNumParams(), hasByteCountSuffix(), llvm::Value::hasName(), llvm::GlobalValue::hasPrivateLinkage(), llvm::Function::hasStructRetAttr(), llvm::FunctionType::isVarArg(), llvm::CallingConv::X86_FastCall, and llvm::CallingConv::X86_VectorCall.

Referenced by EmitCamlGlobal(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::WasmException::endModule(), llvm::RecordStreamer::flushSymverDirectives(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::ExecutionEngine::getMangledName(), llvm::AArch64_MachoTargetObjectFile::getNameWithPrefix(), getNameWithPrefix(), llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetMachine::getNameWithPrefix(), llvm::MCJIT::getSymbolAddress(), GetSymbolFromOperand(), llvm::M68kMCInstLower::GetSymbolFromOperand(), llvm::FastISel::lowerCallTo(), llvm::orc::LLJIT::mangle(), llvm::orc::MangleAndInterner::operator()(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), and llvm::FastISel::CallLoweringInfo::setCallee().

◆ getNameWithPrefix() [2/4]

void Mangler::getNameWithPrefix ( raw_ostream & OS,
const Twine & GVName,
const DataLayout & DL )
static

Print the appropriate prefix and the specified name as the global variable name.

GVName must not be empty.

Definition at line 71 of file Mangler.cpp.

References llvm::Default, DL, and getNameWithPrefixImpl().

◆ getNameWithPrefix() [3/4]

void Mangler::getNameWithPrefix ( SmallVectorImpl< char > & OutName,
const GlobalValue * GV,
bool CannotUsePrivateLabel ) const

Definition at line 188 of file Mangler.cpp.

References getNameWithPrefix().

◆ getNameWithPrefix() [4/4]

void Mangler::getNameWithPrefix ( SmallVectorImpl< char > & OutName,
const Twine & GVName,
const DataLayout & DL )
static

Definition at line 76 of file Mangler.cpp.

References llvm::Default, DL, and getNameWithPrefixImpl().


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