clang  6.0.0svn
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.def"
#include "clang/Basic/OpenCLImageTypes.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 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:

◆ 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:

◆ 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 290 of file CodeGenTypes.cpp.

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 158 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(), 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 117 of file CodeGenTypes.cpp.

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

◆ 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 182 of file CodeGenTypes.cpp.

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