LLVM API Documentation

llvm::Mangler Class Reference

#include <Mangler.h>

Collaboration diagram for llvm::Mangler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Mangler (Module &M, const char *Prefix="")
void setUseQuotes (bool Val)
void markCharAcceptable (unsigned char X)
void markCharUnacceptable (unsigned char X)
bool isCharAcceptable (unsigned char X) const
unsigned getTypeID (const Type *Ty)
std::string getValueName (const GlobalValue *V)
std::string getValueName (const Value *V)
std::string makeNameProper (const std::string &x, const char *Prefix="")

Detailed Description

Definition at line 27 of file Mangler.h.


Constructor & Destructor Documentation

Mangler::Mangler ( Module M,
const char *  Prefix = "" 
)

Definition at line 176 of file Mangler.cpp.

References llvm::Module::begin(), E, llvm::Module::end(), llvm::Module::global_begin(), llvm::Module::global_end(), I, M, markCharAcceptable(), and llvm::X.


Member Function Documentation

unsigned Mangler::getTypeID ( const Type Ty  ) 

getTypeID - Return a unique ID for the specified LLVM type.

Definition at line 104 of file Mangler.cpp.

References E, and Ty.

Referenced by getValueName().

std::string Mangler::getValueName ( const Value V  ) 

Definition at line 110 of file Mangler.cpp.

References getTypeID(), getValueName(), GV, Name, llvm::utostr(), and V.

std::string Mangler::getValueName ( const GlobalValue V  ) 

getValueName - Returns the mangled name of V, an LLVM Value, in the current module.

Definition at line 124 of file Mangler.cpp.

References getTypeID(), GV, makeNameProper(), Name, and llvm::utostr().

Referenced by llvm::X86SharedAsmPrinter::doFinalization(), llvm::AsmPrinter::EmitConstantValueOnly(), getValueName(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printOperand(), and llvm::AsmPrinter::SetupMachineFunction().

bool llvm::Mangler::isCharAcceptable ( unsigned char  X  )  const [inline]

Definition at line 77 of file Mangler.h.

Referenced by makeNameProper().

std::string Mangler::makeNameProper ( const std::string &  x,
const char *  Prefix = "" 
)

makeNameProper - We don't want identifier names with ., space, or

Definition at line 32 of file Mangler.cpp.

References E, I, isCharAcceptable(), and MangleLetter().

Referenced by getValueName().

void llvm::Mangler::markCharAcceptable ( unsigned char  X  )  [inline]

Acceptable Characters - This allows the target to specify which characters are acceptable to the assembler without being mangled. By default we allow letters, numbers, '_', '$', and '.', which is what GAS accepts.

Definition at line 71 of file Mangler.h.

Referenced by Mangler().

void llvm::Mangler::markCharUnacceptable ( unsigned char  X  )  [inline]

Definition at line 74 of file Mangler.h.

void llvm::Mangler::setUseQuotes ( bool  Val  )  [inline]

setUseQuotes - If UseQuotes is set to true, this target accepts quoted strings for assembler labels.

Definition at line 66 of file Mangler.h.


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