clang 10.0.0git

Enumerations | Functions
CGNonTrivialStruct.cpp File Reference
`#include "CodeGenFunction.h"`
`#include "CodeGenModule.h"`
`#include "clang/AST/NonTrivialTypeVisitor.h"`
`#include "clang/CodeGen/CodeGenABITypes.h"`
`#include "llvm/Support/ScopedPrinter.h"`
`#include <array>`
Include dependency graph for CGNonTrivialStruct.cpp:

Go to the source code of this file.

## Enumerations
enum |

## Functions
static uint64_t | getFieldSize (const FieldDecl *FD, QualType FT, ASTContext &Ctx)
template<class G , size_t N>
static void | callSpecialFunction (G &&Gen, StringRef FuncName, QualType QT, bool IsVolatile, CodeGenFunction &CGF, std::array< Address, N > Addrs)
template<size_t N>
static std::array< Address, N > | createNullAddressArray ()
template<>
std::array< Address, 1 > | createNullAddressArray ()
template<>
std::array< Address, 2 > | createNullAddressArray ()
template<class G , size_t N>
static llvm::Function * | getSpecialFunction (G &&Gen, StringRef FuncName, QualType QT, bool IsVolatile, std::array< CharUnits, N > Alignments, CodeGenModule &CGM)

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Definition at line 33 of file CGNonTrivialStruct.cpp.

## Function Documentation

## ◆ callSpecialFunction()

template<class G , size_t N>

static void callSpecialFunction | ( | G && | Gen,
|  | StringRef | FuncName,
|  | QualType | QT,
|  | bool | IsVolatile,
|  | CodeGenFunction & | CGF,
|  | std::array< Address, N > | Addrs
| ) |  |
| static

Definition at line 818 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CGBuilderTy::CreateBitCast(), createNullAddressArray(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, and clang::QualType::withVolatile().

Referenced by clang::CodeGen::CodeGenFunction::callCStructCopyAssignmentOperator(), clang::CodeGen::CodeGenFunction::callCStructCopyConstructor(), clang::CodeGen::CodeGenFunction::callCStructDefaultConstructor(), clang::CodeGen::CodeGenFunction::callCStructDestructor(), clang::CodeGen::CodeGenFunction::callCStructMoveAssignmentOperator(), and clang::CodeGen::CodeGenFunction::callCStructMoveConstructor().

## ◆ createNullAddressArray() [1/3]

template<size_t N>

static std::array<Address, N> createNullAddressArray | ( |  | ) |
| static

Definition at line 830 of file CGNonTrivialStruct.cpp.

References clang::CharUnits::Zero().

Referenced by callSpecialFunction().

## ◆ createNullAddressArray() [2/3]

template<>

std::array<Address, 1> createNullAddressArray | ( |  | ) |

Definition at line 830 of file CGNonTrivialStruct.cpp.

References clang::CharUnits::Zero().

## ◆ createNullAddressArray() [3/3]

template<>

std::array<Address, 2> createNullAddressArray | ( |  | ) |

Definition at line 834 of file CGNonTrivialStruct.cpp.

References clang::CharUnits::Zero().

Referenced by callSpecialFunction().

## ◆ getFieldSize()

static uint64_t getFieldSize | ( | const FieldDecl * | FD,
|  | QualType | FT,
|  | ASTContext & | Ctx
| ) |  |
| static

Definition at line 25 of file CGNonTrivialStruct.cpp.

References clang::Type::castAs(), End, clang::RecordDecl::fields(), clang::ASTContext::getASTRecordLayout(), clang::FieldDecl::getBitWidthValue(), clang::FieldDecl::getFieldIndex(), getFieldOffset(), clang::FieldDecl::getParent(), clang::ASTContext::getTypeSize(), clang::FieldDecl::isBitField(), clang::QualType::isVolatileQualified(), Offset, clang::ASTContext::toCharUnitsFromBits(), clang::QualType::withVolatile(), and clang::CharUnits::Zero().

## ◆ getSpecialFunction()

template<class G , size_t N>

static llvm::Function* getSpecialFunction | ( | G && | Gen,
|  | StringRef | FuncName,
|  | QualType | QT,
|  | bool | IsVolatile,
|  | std::array< CharUnits, N > | Alignments,
|  | CodeGenModule & | CGM
| ) |  |
| static

Definition at line 841 of file CGNonTrivialStruct.cpp.

References clang::QualType::withVolatile().

Referenced by clang::CodeGen::getNonTrivialCStructCopyAssignmentOperator(), clang::CodeGen::getNonTrivialCStructCopyConstructor(), clang::CodeGen::getNonTrivialCStructDefaultConstructor(), clang::CodeGen::getNonTrivialCStructDestructor(), clang::CodeGen::getNonTrivialCStructMoveAssignmentOperator(), and clang::CodeGen::getNonTrivialCStructMoveConstructor().