clang 10.0.0git

Macros | Functions
CodeGenTypes.cpp File Reference
`#include "CodeGenTypes.h"`
`#include "CGCXXABI.h"`
`#include "CGCall.h"`
`#include "CGOpenCLRuntime.h"`
`#include "CGRecordLayout.h"`
`#include "TargetInfo.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/AST/DeclCXX.h"`
`#include "clang/AST/DeclObjC.h"`
`#include "clang/AST/Expr.h"`
`#include "clang/AST/RecordLayout.h"`
`#include "clang/CodeGen/CGFunctionInfo.h"`
`#include "llvm/IR/DataLayout.h"`
`#include "llvm/IR/DerivedTypes.h"`
`#include "llvm/IR/Module.h"`
`#include "clang/AST/TypeNodes.inc"`
`#include "clang/Basic/OpenCLImageTypes.def"`
`#include "clang/Basic/OpenCLExtensionTypes.def"`
`#include "clang/Basic/AArch64SVEACLETypes.def"`
`#include "clang/AST/BuiltinTypes.def"`
Include dependency graph for CodeGenTypes.cpp:

Go to the source code of this file.

## Macros
#define | TYPE(Class, Base)
#define | ABSTRACT_TYPE(Class, Base)
#define | NON_CANONICAL_TYPE(Class, Base) case Type::Class:
#define | DEPENDENT_TYPE(Class, Base) case Type::Class:
#define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) case BuiltinType::Id:
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) case BuiltinType::Id:
#define | SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
#define | BUILTIN_TYPE(Id, SingletonId)
#define | PLACEHOLDER_TYPE(Id, SingletonId) case BuiltinType::Id:

## Functions
static bool | isSafeToConvert (QualType T, CodeGenTypes &CGT, llvm::SmallPtrSet< const RecordDecl *, 16 > &AlreadyChecked)
| isSafeToConvert - Return true if it is safe to convert this field type, which requires the structure elements contained by-value to all be recursively safe to convert. More...
static bool | isSafeToConvert (const RecordDecl *RD, CodeGenTypes &CGT, llvm::SmallPtrSet< const RecordDecl *, 16 > &AlreadyChecked)
| isSafeToConvert - Return true if it is safe to convert the specified record decl to IR and lay it out, false if doing so would cause us to get into a recursive compilation mess. More...
static bool | isSafeToConvert (const RecordDecl *RD, CodeGenTypes &CGT)
| isSafeToConvert - Return true if it is safe to convert the specified record decl to IR and lay it out, false if doing so would cause us to get into a recursive compilation mess. More...
static llvm::Type * | getTypeForFormat (llvm::LLVMContext &VMContext, const llvm::fltSemantics &format, bool UseNativeHalf=false)

## Macro Definition Documentation

## ◆ ABSTRACT_TYPE

#define ABSTRACT_TYPE | ( |  | Class,
|  |  | Base
| ) |  |

## ◆ BUILTIN_TYPE

#define BUILTIN_TYPE | ( |  | Id,
|  |  | SingletonId
| ) |  |

## ◆ DEPENDENT_TYPE

#define DEPENDENT_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ EXT_OPAQUE_TYPE

#define EXT_OPAQUE_TYPE | ( |  | ExtType,
|  |  | Id,
|  |  | Ext
| ) |  | case BuiltinType::Id:

## ◆ IMAGE_TYPE

#define IMAGE_TYPE | ( |  | ImgType,
|  |  | Id,
|  |  | SingletonId,
|  |  | Access,
|  |  | Suffix
| ) |  | case BuiltinType::Id:

## ◆ NON_CANONICAL_TYPE

#define NON_CANONICAL_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ PLACEHOLDER_TYPE

#define PLACEHOLDER_TYPE | ( |  | Id,
|  |  | SingletonId
| ) |  | case BuiltinType::Id:

## ◆ SVE_TYPE

#define SVE_TYPE | ( |  | Name,
|  |  | Id,
|  |  | SingletonId
| ) |  | case BuiltinType::Id:

## ◆ TYPE

#define TYPE | ( |  | Class,
|  |  | Base
| ) |  |

## Function Documentation

## ◆ getTypeForFormat()

static llvm::Type* getTypeForFormat | ( | llvm::LLVMContext & | VMContext,
|  | const llvm::fltSemantics & | format,
|  | bool | UseNativeHalf = `false`
| ) |  |
| static

Definition at line 289 of file CodeGenTypes.cpp.

References clang::CodeGen::CodeGenTypes::arrangeFreeFunctionType(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::Type::getAs(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenTypes::getLLVMContext(), clang::FunctionType::getReturnType(), clang::QualType::getTypePtr(), clang::QualType::isCanonical(), clang::CodeGen::CodeGenTypes::isFuncTypeConvertible(), and clang::CodeGen::Type.

Referenced by clang::CodeGen::CodeGenTypes::ConvertType().

## ◆ isSafeToConvert() [1/3]

static bool isSafeToConvert | ( | QualType | T,
|  | CodeGenTypes & | CGT,
|  | llvm::SmallPtrSet< const RecordDecl *, 16 > & | AlreadyChecked
| ) |  |
| static

isSafeToConvert - Return true if it is safe to convert this field type, which requires the structure elements contained by-value to all be recursively safe to convert.

Definition at line 157 of file CodeGenTypes.cpp.

References clang::Type::getAs(), clang::ASTContext::getAsArrayType(), and clang::CodeGen::CodeGenTypes::getContext().

Referenced by clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::CodeGen::CodeGenTypes::isFuncParamTypeConvertible(), clang::CodeGen::CodeGenTypes::isRecordLayoutComplete(), and isSafeToConvert().

## ◆ isSafeToConvert() [2/3]

static bool isSafeToConvert | ( | const RecordDecl * | RD,
|  | CodeGenTypes & | CGT,
|  | llvm::SmallPtrSet< const RecordDecl *, 16 > & | AlreadyChecked
| ) |  |
| static

isSafeToConvert - Return true if it is safe to convert the specified record decl to IR and lay it out, false if doing so would cause us to get into a recursive compilation mess.

Definition at line 116 of file CodeGenTypes.cpp.

References clang::RecordDecl::fields(), clang::CodeGen::CodeGenTypes::getContext(), clang::ASTContext::getTagDeclType(), clang::QualType::getTypePtr(), clang::CodeGen::CodeGenTypes::isRecordBeingLaidOut(), clang::CodeGen::CodeGenTypes::isRecordLayoutComplete(), and isSafeToConvert().

## ◆ isSafeToConvert() [3/3]

static bool isSafeToConvert | ( | const RecordDecl * | RD,
|  | CodeGenTypes & | CGT
| ) |  |
| static

isSafeToConvert - Return true if it is safe to convert the specified record decl to IR and lay it out, false if doing so would cause us to get into a recursive compilation mess.

Definition at line 181 of file CodeGenTypes.cpp.

References isSafeToConvert(), and clang::CodeGen::CodeGenTypes::noRecordsBeingLaidOut().