class ItaniumManglingCanonicalizer

Declaration

class ItaniumManglingCanonicalizer { /* full declaration omitted */ };

Description

Canonicalizer for mangled names. This class allows specifying a list of "equivalent" manglings. For example, you can specify that Ss is equivalent to NSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE and then manglings that refer to libstdc++'s 'std::string' will be considered equivalent to manglings that are the same except that they refer to libc++'s 'std::string'. This can be used when data (eg, profiling data) is available for a version of a program built in a different configuration, with correspondingly different manglings.

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:35

Member Variables

private llvm::ItaniumManglingCanonicalizer::Impl* P

Method Overview

Methods

ItaniumManglingCanonicalizer()

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:37

ItaniumManglingCanonicalizer(
    const llvm::ItaniumManglingCanonicalizer&)

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:38

Parameters

const llvm::ItaniumManglingCanonicalizer&

llvm::ItaniumManglingCanonicalizer::
    EquivalenceError
    addEquivalence(
        llvm::ItaniumManglingCanonicalizer::
            FragmentKind Kind,
        llvm::StringRef First,
        llvm::StringRef Second)

Description

Add an equivalence between \p First and \p Second. Both manglings must live at least as long as the canonicalizer.

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:68

Parameters

llvm::ItaniumManglingCanonicalizer::FragmentKind Kind
llvm::StringRef First
llvm::StringRef Second

llvm::ItaniumManglingCanonicalizer::Key
canonicalize(llvm::StringRef Mangling)

Description

Form a canonical key for the specified mangling. They key will be the same for all equivalent manglings, and different for any two non-equivalent manglings, but is otherwise unspecified. Returns Key() if (and only if) the mangling is not a valid Itanium C++ ABI mangling. The string denoted by Mangling must live as long as the canonicalizer.

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:81

Parameters

llvm::StringRef Mangling

llvm::ItaniumManglingCanonicalizer::Key lookup(
    llvm::StringRef Mangling)

Description

Find a canonical key for the specified mangling, if one has already been formed. Otherwise returns Key().

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:85

Parameters

llvm::StringRef Mangling

~ItaniumManglingCanonicalizer()

Declared at: llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h:40