LLVM 24.0.0git
llvm::orc::SymbolNameSpec Class Reference

A symbol name together with the naming level (SymbolNameKind) it is expressed in, so that a Mangler / MangleAndInterner can mangle it to linker level rather than requiring callers to pre-mangle. More...

#include "llvm/ExecutionEngine/Orc/Shared/SymbolNameSpec.h"

Public Member Functions

constexpr SymbolNameSpec (StringRef Name, SymbolNameKind Kind=SymbolNameKind::Verbatim)
constexpr StringRef getName () const
constexpr SymbolNameKind getKind () const

Static Public Member Functions

static constexpr SymbolNameSpec verbatim (StringRef Name)
static constexpr SymbolNameSpec linker (StringRef Name)
static constexpr SymbolNameSpec ir (StringRef Name)
static constexpr SymbolNameSpec c (StringRef Name)

Detailed Description

A symbol name together with the naming level (SymbolNameKind) it is expressed in, so that a Mangler / MangleAndInterner can mangle it to linker level rather than requiring callers to pre-mangle.

The name is not copied: a SymbolNameSpec must not outlive the string it refers to.

Implicitly constructible from a StringRef, defaulting to Verbatim, so that APIs taking a SymbolNameSpec stay drop-in replacements for ones that previously took an already-mangled StringRef.

Definition at line 39 of file SymbolNameSpec.h.

Constructor & Destructor Documentation

◆ SymbolNameSpec()

llvm::orc::SymbolNameSpec::SymbolNameSpec ( StringRef Name,
SymbolNameKind Kind = SymbolNameKind::Verbatim )
inlineconstexpr

Definition at line 41 of file SymbolNameSpec.h.

References llvm::orc::Verbatim.

Referenced by c(), ir(), linker(), and verbatim().

Member Function Documentation

◆ c()

constexpr SymbolNameSpec llvm::orc::SymbolNameSpec::c ( StringRef Name)
inlinestaticconstexpr

Definition at line 54 of file SymbolNameSpec.h.

References llvm::orc::C, and SymbolNameSpec().

◆ getKind()

SymbolNameKind llvm::orc::SymbolNameSpec::getKind ( ) const
inlineconstexpr

Definition at line 59 of file SymbolNameSpec.h.

Referenced by llvm::orc::Mangler::withMangledNameDo().

◆ getName()

StringRef llvm::orc::SymbolNameSpec::getName ( ) const
inlineconstexpr

Definition at line 58 of file SymbolNameSpec.h.

Referenced by llvm::orc::Mangler::withMangledNameDo().

◆ ir()

constexpr SymbolNameSpec llvm::orc::SymbolNameSpec::ir ( StringRef Name)
inlinestaticconstexpr

Definition at line 51 of file SymbolNameSpec.h.

References llvm::orc::IR, and SymbolNameSpec().

◆ linker()

constexpr SymbolNameSpec llvm::orc::SymbolNameSpec::linker ( StringRef Name)
inlinestaticconstexpr

Definition at line 48 of file SymbolNameSpec.h.

References llvm::orc::Linker, and SymbolNameSpec().

◆ verbatim()

constexpr SymbolNameSpec llvm::orc::SymbolNameSpec::verbatim ( StringRef Name)
inlinestaticconstexpr

Definition at line 45 of file SymbolNameSpec.h.

References SymbolNameSpec(), and llvm::orc::Verbatim.


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