class TargetCXXABI

Declaration

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

Description

The basic abstraction for the target C++ ABI.

Declared at: clang/include/clang/Basic/TargetCXXABI.h:28

Member Variables

private clang::TargetCXXABI::Kind TheKind

Method Overview

Methods

TargetCXXABI()

Description

A bogus initialization of the platform ABI.

Declared at: clang/include/clang/Basic/TargetCXXABI.h:74

TargetCXXABI(clang::TargetCXXABI::Kind kind)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:76

Parameters

clang::TargetCXXABI::Kind kind

bool areArgsDestroyedLeftToRightInCallee() const

Description

Are arguments to a call destroyed left to right in the callee? This is a fundamental language change, since it implies that objects passed by value do *not* live to the end of the full expression. Temporaries passed to a function taking a const reference live to the end of the full expression as usual. Both the caller and the callee must have access to the destructor, while only the caller needs the destructor if this is false.

Declared at: clang/include/clang/Basic/TargetCXXABI.h:190

bool areMemberFunctionsAligned() const

Description

Are member functions differently aligned? Many Itanium-style C++ ABIs require member functions to be aligned, so that a pointer to such a function is guaranteed to have a zero in the least significant bit, so that pointers to member functions can use that bit to distinguish between virtual and non-virtual functions. However, some Itanium-style C++ ABIs differentiate between virtual and non-virtual functions via other means, and consequently don't require that member functions be aligned.

Declared at: clang/include/clang/Basic/TargetCXXABI.h:160

bool canKeyFunctionBeInline() const

Description

Can an out-of-line inline function serve as a key function? This flag is only useful in ABIs where type data (for example, vtables and type_info objects) are emitted only after processing the definition of a special "key" virtual function. (This is safe because the ODR requires that every virtual function be defined somewhere in a program.) This usually permits such data to be emitted in only a single object file, as opposed to redundantly in every object file that requires it. One simple and common definition of "key function" is the first virtual function in the class definition which is not defined there. This rule works very well when that function has a non-inline definition in some non-header file. Unfortunately, when that function is defined inline, this rule requires the type data to be emitted weakly, as if there were no key function. The ARM ABI observes that the ODR provides an additional guarantee: a virtual function is always ODR-used, so if it is defined inline, that definition must appear in every translation unit that defines the class. Therefore, there is no reason to allow such functions to serve as key functions. Because this changes the rules for emitting type data, it can cause type data to be emitted with both weak and strong linkage, which is not allowed on all platforms. Therefore, exploiting this observation requires an ABI break and cannot be done on a generic Itanium platform.

Declared at: clang/include/clang/Basic/TargetCXXABI.h:240

static const llvm::StringMap<Kind>& getABIMap()

Declared at: clang/include/clang/Basic/TargetCXXABI.h:42

static clang::TargetCXXABI::Kind getKind(
    llvm::StringRef Name)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:59

Parameters

llvm::StringRef Name

clang::TargetCXXABI::Kind getKind() const

Declared at: clang/include/clang/Basic/TargetCXXABI.h:82

static std::basic_string<char> const& getSpelling(
    clang::TargetCXXABI::Kind ABIKind)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:60

Parameters

clang::TargetCXXABI::Kind ABIKind

static const std::map<Kind, std::string>&
getSpellingMap()

Declared at: clang/include/clang/Basic/TargetCXXABI.h:50

clang::TargetCXXABI::TailPaddingUseRules
getTailPaddingUseRules() const

Declared at: clang/include/clang/Basic/TargetCXXABI.h:282

bool hasConstructorVariants() const

Description

Does this ABI have different entrypoints for complete-object and base-subobject constructors?

Declared at: clang/include/clang/Basic/TargetCXXABI.h:196

bool hasKeyFunctions() const

Description

Does this ABI use key functions? If so, class data such as the vtable is emitted with strong linkage by the TU containing the key function.

Declared at: clang/include/clang/Basic/TargetCXXABI.h:208

bool hasPrimaryVBases() const

Description

Does this ABI allow virtual bases to be primary base classes?

Declared at: clang/include/clang/Basic/TargetCXXABI.h:201

static bool isABI(llvm::StringRef Name)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:63

Parameters

llvm::StringRef Name

bool isItaniumFamily() const

Description

Does this ABI generally fall into the Itanium family of ABIs?

Declared at: clang/include/clang/Basic/TargetCXXABI.h:124

bool isMicrosoft() const

Description

Is this ABI an MSVC-compatible ABI?

Declared at: clang/include/clang/Basic/TargetCXXABI.h:138

static bool isSupportedCXXABI(
    const llvm::Triple& T,
    clang::TargetCXXABI::Kind Kind)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:89

Parameters

const llvm::Triple& T
clang::TargetCXXABI::Kind Kind

void set(clang::TargetCXXABI::Kind kind)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:78

Parameters

clang::TargetCXXABI::Kind kind

static bool usesRelativeVTables(
    const llvm::Triple& T)

Declared at: clang/include/clang/Basic/TargetCXXABI.h:69

Parameters

const llvm::Triple& T