LLVM API Documentation
#include <Mangler.h>
Public Types | |
| enum | ManglerPrefixTy { Default, Private, LinkerPrivate } |
Public Member Functions | |
| Mangler (Module &M, const char *Prefix="", const char *privatePrefix="", const char *linkerPrivatePrefix="") | |
| void | setUseQuotes (bool Val) |
| void | markCharAcceptable (unsigned char X) |
| void | markCharUnacceptable (unsigned char X) |
| bool | isCharAcceptable (unsigned char X) const |
| std::string | getMangledName (const GlobalValue *V, const char *Suffix="", bool ForcePrivate=false) |
| std::string | makeNameProper (const std::string &x, ManglerPrefixTy PrefixTy=Mangler::Default) |
Definition at line 27 of file Mangler.h.
| Mangler::Mangler | ( | Module & | M, | |
| const char * | Prefix = "", |
|||
| const char * | privatePrefix = "", |
|||
| const char * | linkerPrivatePrefix = "" | |||
| ) |
Definition at line 161 of file Mangler.cpp.
References llvm::array_endof(), markCharAcceptable(), and llvm::X.
| 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 75 of file Mangler.h.
Referenced by llvm::AsmPrinter::doInitialization().
| void llvm::Mangler::markCharAcceptable | ( | unsigned char | X | ) | [inline] |
| void llvm::Mangler::markCharUnacceptable | ( | unsigned char | X | ) | [inline] |
Definition at line 83 of file Mangler.h.
Referenced by llvm::X86IntelAsmPrinter::doInitialization().
| std::string Mangler::getMangledName | ( | const GlobalValue * | GV, | |
| const char * | Suffix = "", |
|||
| bool | ForcePrivate = false | |||
| ) |
getMangledName - Returns the mangled name of V, an LLVM Value, in the current module. If 'Suffix' is specified, the name ends with the specified suffix. If 'ForcePrivate' is specified, the label is specified to have a private label prefix.
getMangledName - Returns the mangled name of V, an LLVM Value, in the current module. If 'Suffix' is specified, the name ends with the specified suffix. If 'ForcePrivate' is specified, the label is specified to have a private label prefix.
Definition at line 140 of file Mangler.cpp.
References Default, llvm::Value::getNameStr(), llvm::GlobalValue::hasLinkerPrivateLinkage(), llvm::Value::hasName(), llvm::GlobalValue::hasPrivateLinkage(), ID, LinkerPrivate, makeNameProper(), Private, and llvm::utostr().
Referenced by llvm::X86ATTAsmPrinter::doFinalization(), llvm::AsmPrinter::doFinalization(), llvm::X86IntelAsmPrinter::doInitialization(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::AsmPrinter::getCurrentFunctionEHName(), llvm::AsmPrinter::getGlobalLinkName(), llvm::MSILWriter::getLabelName(), llvm::MSILWriter::getLibraryName(), llvm::MSILWriter::getValueName(), llvm::X86ATTAsmPrinter::LowerGlobalAddressOperand(), llvm::X86IntelAsmPrinter::print_pcrel_imm(), llvm::MSILWriter::printExternals(), llvm::X86IntelAsmPrinter::PrintGlobalVariable(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printSymbolOperand(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), llvm::AsmPrinter::SetupMachineFunction(), llvm::TargetLoweringObjectFileMachO::shouldEmitUsedDirectiveFor(), and llvm::MachOCodeEmitter::startFunction().
| std::string Mangler::makeNameProper | ( | const std::string & | X, | |
| ManglerPrefixTy | PrefixTy = Mangler::Default | |||
| ) |
makeNameProper - We don't want identifier names with ., space, or
makeNameProper - We don't want identifier names non-C-identifier characters in them, so mangle them as appropriate.
Definition at line 34 of file Mangler.cpp.
References E, isCharAcceptable(), LinkerPrivate, MangleLetter(), and Private.
Referenced by getMangledName(), llvm::X86ATTAsmPrinter::LowerExternalSymbolOperand(), llvm::X86ATTAsmPrinter::printSymbolOperand(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().