clang 20.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions
clang::CodeGen Namespace Reference

Namespaces

namespace  MCDC
 
namespace  swiftcall
 

Classes

class  ABIArgInfo
 ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to or returned from a function. More...
 
class  ABIInfo
 ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions. More...
 
class  Address
 Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this class is possibly signed. More...
 
class  AggValueSlot
 An aggregate value slot. More...
 
class  ApplyDebugLocation
 A scoped helper to set the current debug location to the specified location or preferred location of the specified Expr. More...
 
class  ApplyInlineDebugLocation
 A scoped helper to set the current debug location to an inlined location. More...
 
class  BlockByrefHelpers
 A pair of helper functions for a __block variable. More...
 
class  BlockByrefInfo
 Information about the layout of a __block variable. More...
 
class  BlockFieldFlags
 
class  BlockFlags
 
struct  BranchFixup
 A branch fixup. More...
 
struct  CallArg
 
class  CallArgList
 CallArgList - Type for representing both the value and type of arguments in a call. More...
 
struct  CatchRetScope
 
struct  CatchTypeInfo
 The MS C++ ABI needs a pointer to RTTI data plus some flags to describe the type of a catch handler, so we use this wrapper. More...
 
struct  CGBitFieldInfo
 Structure with information about how a bitfield should be accessed. More...
 
class  CGBlockInfo
 CGBlockInfo - Information to generate a block literal. More...
 
class  CGBuilderInserter
 This is an IRBuilder insertion helper that forwards to CodeGenFunction::InsertHelper, which adds necessary metadata to instructions. More...
 
class  CGBuilderTy
 
class  CGCallee
 All available information about a concrete callee. More...
 
class  CGCalleeInfo
 Abstract information about a function or function prototype. More...
 
struct  CGCoroData
 
class  CGCUDARuntime
 
class  CGCXXABI
 Implements C++ ABI-specific code generation functions. More...
 
class  CGDebugInfo
 This class gathers all debug information during compilation and is responsible for emitting to llvm globals or pass directly to the backend. More...
 
class  CGFunctionInfo
 CGFunctionInfo - Class to encapsulate the information about a function definition. More...
 
struct  CGFunctionInfoArgInfo
 
class  CGHLSLRuntime
 
class  CGObjCRuntime
 Implements runtime-specific code generation functions. More...
 
class  CGOpenCLRuntime
 
class  CGOpenMPRuntime
 
class  CGOpenMPRuntimeGPU
 
class  CGOpenMPSIMDRuntime
 Class supports emissionof SIMD-only code. More...
 
class  CGPointerAuthInfo
 
class  CGRecordLayout
 CGRecordLayout - This class handles struct and union layout info while lowering AST types to LLVM types. More...
 
class  CodeGenFunction
 CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code. More...
 
class  CodeGenModule
 This class organizes the cross-function state that is used while generating LLVM code. More...
 
class  CodeGenPGO
 Per-function PGO state. More...
 
class  CodeGenTBAA
 CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types. More...
 
struct  CodeGenTypeCache
 This structure provides a set of types that are commonly used during IR emission. More...
 
class  CodeGenTypes
 This class organizes the cross-module state that is used while lowering AST types to LLVM types. More...
 
class  CodeGenVTables
 
class  ConstantAddress
 A specialization of Address that requires the address to be an LLVM Constant. More...
 
class  ConstantAggregateBuilderBase
 A concrete base class for struct and array aggregate initializer builders. More...
 
class  ConstantAggregateBuilderTemplateBase
 
class  ConstantArrayBuilder
 A helper class of ConstantInitBuilder, used for building constant array initializers. More...
 
class  ConstantArrayBuilderTemplateBase
 
class  ConstantEmitter
 
class  ConstantInitBuilder
 The standard implementation of ConstantInitBuilder used in Clang. More...
 
class  ConstantInitBuilderBase
 A convenience builder class for complex constant initializers, especially for anonymous global structures used by various language runtimes. More...
 
class  ConstantInitBuilderTemplateBase
 A template class designed to allow other frontends to easily customize the builder classes used by ConstantInitBuilder, and thus to extend the API to work with the abstractions they prefer. More...
 
struct  ConstantInitBuilderTraits
 
class  ConstantInitFuture
 A "future" for a completed constant initializer, which can be passed around independently of any sub-builders (but not the original parent). More...
 
class  ConstantStructBuilder
 A helper class of ConstantInitBuilder, used for building constant struct initializers. More...
 
class  ConstantStructBuilderTemplateBase
 A template class designed to allow other frontends to easily customize the builder classes used by ConstantInitBuilder, and thus to extend the API to work with the abstractions they prefer. More...
 
class  CoverageMappingGen
 Organizes the per-function state that is used while generating code coverage mapping data. More...
 
class  CoverageMappingModuleGen
 Organizes the cross-function state that is used while generating code coverage mapping data. More...
 
class  DefaultABIInfo
 DefaultABIInfo - The default implementation for ABI specific details. More...
 
struct  DominatingLLVMValue
 Helper class with most of the code for saving a value for a conditional expression cleanup. More...
 
struct  DominatingPointer
 
struct  DominatingPointer< T, false >
 
struct  DominatingPointer< T, true >
 A partial specialization of DominatingValue for llvm::Values that might be llvm::Instructions. More...
 
struct  DominatingValue
 A metaprogramming class for ensuring that a value will dominate an arbitrary position in a function. More...
 
struct  DominatingValue< Address >
 A specialization of DominatingValue for Address. More...
 
struct  DominatingValue< RValue >
 A specialization of DominatingValue for RValue. More...
 
struct  DominatingValue< T * >
 
class  EHCatchScope
 A scope which attempts to handle some, possibly all, types of exceptions. More...
 
class  EHCleanupScope
 A cleanup scope which generates the cleanup blocks lazily. More...
 
class  EHFilterScope
 An exceptions scope which filters exceptions thrown through it. More...
 
struct  EHPersonality
 The exceptions personality for a function. More...
 
class  EHScope
 A protected scope for zero-cost EH handling. More...
 
class  EHScopeStack
 A stack of scopes which respond to exceptions, including cleanups and catch blocks. More...
 
class  EHTerminateScope
 An exceptions scope which calls std::terminate if any exception reaches it. More...
 
class  FunctionArgList
 FunctionArgList - Type for representing both the decl and type of parameters to a function. More...
 
struct  ImplicitCXXConstructorArgs
 Additional implicit arguments to add to a constructor argument list. More...
 
class  InstrProfStats
 This class records statistics on instrumentation based profiling. More...
 
struct  InvariantValue
 
struct  LoopAttributes
 Attributes that may be specified on loops. More...
 
class  LoopInfo
 Information used when generating a structured loop. More...
 
class  LoopInfoStack
 A stack of loop information corresponding to loop nesting levels. More...
 
class  LValue
 LValue - This represents an lvalue references. More...
 
class  LValueBaseInfo
 
struct  ObjCEntrypoints
 
struct  OMPTaskDataTy
 
struct  OrderGlobalInitsOrStermFinalizers
 
class  PrePostActionTy
 A basic class for pre|post-action for advanced codegen sequence for OpenMP region. More...
 
class  RawAddress
 An abstract representation of an aligned address. More...
 
class  ReductionCodeGen
 Class intended to support codegen of all kind of the reduction clauses. More...
 
class  RegionCodeGenTy
 Class provides a way to call simple version of codegen for OpenMP region, or an advanced with possible pre|post-actions in codegen. More...
 
class  RequiredArgs
 A class for recording the number of arguments that a function signature requires. More...
 
class  ReturnValueSlot
 ReturnValueSlot - Contains the address where the return value of a function can be stored, and whether the address is volatile or not. More...
 
class  RValue
 RValue - This trivial value class is used to represent the result of an expression that is evaluated. More...
 
class  SanitizerMetadata
 
class  SwiftABIInfo
 Target specific hooks for defining how a type should be passed or returned from functions with one of the Swift calling conventions. More...
 
class  TargetCodeGenInfo
 TargetCodeGenInfo - This class organizes various target-specific codegeneration issues, like target-specific attributes, builtins and so on. More...
 
struct  TBAAAccessInfo
 
class  VarBypassDetector
 The class detects jumps which bypass local variables declaration: goto L; int a; L: More...
 

Typedefs

typedef CGBuilderInserter CGBuilderInserterTy
 
typedef llvm::IRBuilder< llvm::ConstantFolder, CGBuilderInserterTyCGBuilderBaseTy
 

Enumerations

enum  KnownNonNull_t { NotKnownNonNull , KnownNonNull }
 
enum  BlockByrefFlags {
  BLOCK_BYREF_HAS_COPY_DISPOSE = (1 << 25) , BLOCK_BYREF_LAYOUT_MASK = (0xF << 28) , BLOCK_BYREF_LAYOUT_EXTENDED = (1 << 28) , BLOCK_BYREF_LAYOUT_NON_OBJECT = (2 << 28) ,
  BLOCK_BYREF_LAYOUT_STRONG = (3 << 28) , BLOCK_BYREF_LAYOUT_WEAK = (4 << 28) , BLOCK_BYREF_LAYOUT_UNRETAINED = (5 << 28)
}
 
enum  BlockLiteralFlags {
  BLOCK_IS_NOESCAPE = (1 << 23) , BLOCK_HAS_COPY_DISPOSE = (1 << 25) , BLOCK_HAS_CXX_OBJ = (1 << 26) , BLOCK_IS_GLOBAL = (1 << 28) ,
  BLOCK_USE_STRET = (1 << 29) , BLOCK_HAS_SIGNATURE = (1 << 30) , BLOCK_HAS_EXTENDED_LAYOUT = (1u << 31)
}
 
enum  BlockFieldFlag_t {
  BLOCK_FIELD_IS_OBJECT = 0x03 , BLOCK_FIELD_IS_BLOCK = 0x07 , BLOCK_FIELD_IS_BYREF = 0x08 , BLOCK_FIELD_IS_WEAK = 0x10 ,
  BLOCK_FIELD_IS_ARC = 0x40 , BLOCK_BYREF_CALLER = 128 , BLOCK_BYREF_CURRENT_MAX = 256
}
 
enum class  BlockCaptureEntityKind {
  None , CXXRecord , ARCWeak , ARCStrong ,
  NonTrivialCStruct , BlockObject
}
 Represents a type of copy/destroy operation that should be performed for an entity that's captured by a block. More...
 
enum class  FnInfoOpts { None = 0 , IsInstanceMethod = 1 << 0 , IsChainCall = 1 << 1 , IsDelegateCall = 1 << 2 }
 
enum  ARCPreciseLifetime_t { ARCImpreciseLifetime , ARCPreciseLifetime }
 Does an ARC strong l-value have precise lifetime? More...
 
enum class  AlignmentSource { Decl , AttributedType , Type }
 The source of the alignment of an l-value; an expression of confidence in the alignment actually matching the estimate. More...
 
enum  TypeEvaluationKind { TEK_Scalar , TEK_Complex , TEK_Aggregate }
 The kind of evaluation to perform on values of a particular type. More...
 
enum  SanitizerHandler { LIST_SANITIZER_CHECKS }
 
enum  ForDefinition_t : bool { NotForDefinition = false , ForDefinition = true }
 
enum class  TBAAAccessKind : unsigned { Ordinary , MayAlias , Incomplete }
 
enum  CleanupKind : unsigned {
  EHCleanup = 0x1 , NormalCleanup = 0x2 , NormalAndEHCleanup = EHCleanup | NormalCleanup , LifetimeMarker = 0x8 ,
  NormalEHLifetimeMarker = LifetimeMarker | NormalAndEHCleanup
}
 
enum class  AArch64ABIKind {
  AAPCS = 0 , DarwinPCS , Win64 , AAPCSSoft ,
  PAuthTest
}
 
enum class  ARMABIKind { APCS = 0 , AAPCS = 1 , AAPCS_VFP = 2 , AAPCS16_VFP = 3 }
 
enum class  PPC64_SVR4_ABIKind { ELFv1 = 0 , ELFv2 }
 
enum class  WebAssemblyABIKind { MVP = 0 , ExperimentalMV = 1 }
 
enum class  X86AVXABILevel { None , AVX , AVX512 }
 The AVX ABI level for X86 targets. More...
 

Functions

const CGFunctionInfoarrangeObjCMessageSendSignature (CodeGenModule &CGM, const ObjCMethodDecl *MD, QualType receiverType)
 
const CGFunctionInfoarrangeFreeFunctionType (CodeGenModule &CGM, CanQual< FunctionProtoType > Ty)
 
const CGFunctionInfoarrangeFreeFunctionType (CodeGenModule &CGM, CanQual< FunctionNoProtoType > Ty)
 
const CGFunctionInfoarrangeCXXMethodType (CodeGenModule &CGM, const CXXRecordDecl *RD, const FunctionProtoType *FTP, const CXXMethodDecl *MD)
 
const CGFunctionInfoarrangeCXXMethodCall (CodeGenModule &CGM, CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, ArrayRef< FunctionProtoType::ExtParameterInfo > paramInfos, RequiredArgs args)
 
const CGFunctionInfoarrangeFreeFunctionCall (CodeGenModule &CGM, CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, ArrayRef< FunctionProtoType::ExtParameterInfo > paramInfos, RequiredArgs args)
 
const CGFunctionInfoarrangeFreeFunctionCall (CodeGenModule &CGM, CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, RequiredArgs args)
 
ImplicitCXXConstructorArgs getImplicitCXXConstructorArgs (CodeGenModule &CGM, const CXXConstructorDecl *D)
 Returns the implicit arguments to add to a complete, non-delegating C++ constructor call.
 
llvm::Value * getCXXDestructorImplicitParam (CodeGenModule &CGM, llvm::BasicBlock *InsertBlock, llvm::BasicBlock::iterator InsertPoint, const CXXDestructorDecl *D, CXXDtorType Type, bool ForVirtualBase, bool Delegating)
 
llvm::FunctionType * convertFreeFunctionType (CodeGenModule &CGM, const FunctionDecl *FD)
 Returns null if the function type is incomplete and can't be lowered.
 
llvm::Type * convertTypeForMemory (CodeGenModule &CGM, QualType T)
 
unsigned getLLVMFieldNumber (CodeGenModule &CGM, const RecordDecl *RD, const FieldDecl *FD)
 Given a non-bitfield struct field, return its index within the elements of the struct's converted type.
 
uint16_t getPointerAuthDeclDiscriminator (CodeGenModule &CGM, GlobalDecl GD)
 Return a declaration discriminator for the given global decl.
 
uint16_t getPointerAuthTypeDiscriminator (CodeGenModule &CGM, QualType FunctionType)
 Return a type discriminator for the given function type.
 
void addDefaultFunctionDefinitionAttributes (CodeGenModule &CGM, llvm::AttrBuilder &attrs)
 Given the language and code-generation options that Clang was configured with, set the default LLVM IR attributes for a function definition.
 
llvm::Function * getNonTrivialCStructDefaultConstructor (CodeGenModule &GCM, CharUnits DstAlignment, bool IsVolatile, QualType QT)
 Returns the default constructor for a C struct with non-trivially copyable fields, generating it if necessary.
 
llvm::Function * getNonTrivialCStructCopyConstructor (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT)
 Returns the copy constructor for a C struct with non-trivially copyable fields, generating it if necessary.
 
llvm::Function * getNonTrivialCStructMoveConstructor (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT)
 Returns the move constructor for a C struct with non-trivially copyable fields, generating it if necessary.
 
llvm::Function * getNonTrivialCStructCopyAssignmentOperator (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT)
 Returns the copy assignment operator for a C struct with non-trivially copyable fields, generating it if necessary.
 
llvm::Function * getNonTrivialCStructMoveAssignmentOperator (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT)
 Return the move assignment operator for a C struct with non-trivially copyable fields, generating it if necessary.
 
llvm::Function * getNonTrivialCStructDestructor (CodeGenModule &CGM, CharUnits DstAlignment, bool IsVolatile, QualType QT)
 Returns the destructor for a C struct with non-trivially copyable fields, generating it if necessary.
 
llvm::Constant * emitObjCProtocolObject (CodeGenModule &CGM, const ObjCProtocolDecl *p)
 Get a pointer to a protocol object for the given declaration, emitting it if it hasn't already been emitted in this translation unit.
 
void AssignToArrayRange (CodeGen::CGBuilderTy &Builder, llvm::Value *Array, llvm::Value *Value, unsigned FirstIndex, unsigned LastIndex)
 
bool isAggregateTypeForABI (QualType T)
 
llvm::Type * getVAListElementType (CodeGenFunction &CGF)
 
CGCXXABI::RecordArgABI getRecordArgABI (const RecordType *RT, CGCXXABI &CXXABI)
 
CGCXXABI::RecordArgABI getRecordArgABI (QualType T, CGCXXABI &CXXABI)
 
bool classifyReturnType (const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
 
QualType useFirstFieldIfTransparentUnion (QualType Ty)
 Pass transparent unions as if they were the type of the first element.
 
llvm::Value * emitRoundPointerUpToAlignment (CodeGenFunction &CGF, llvm::Value *Ptr, CharUnits Align)
 
Address emitVoidPtrDirectVAArg (CodeGenFunction &CGF, Address VAListAddr, llvm::Type *DirectTy, CharUnits DirectSize, CharUnits DirectAlign, CharUnits SlotSize, bool AllowHigherAlign, bool ForceRightAdjust=false)
 Emit va_arg for a platform using the common void* representation, where arguments are simply emitted in an array of slots on the stack.
 
RValue emitVoidPtrVAArg (CodeGenFunction &CGF, Address VAListAddr, QualType ValueTy, bool IsIndirect, TypeInfoChars ValueInfo, CharUnits SlotSizeAndAlign, bool AllowHigherAlign, AggValueSlot Slot, bool ForceRightAdjust=false)
 Emit va_arg for a platform using the common void* representation, where arguments are simply emitted in an array of slots on the stack.
 
Address emitMergePHI (CodeGenFunction &CGF, Address Addr1, llvm::BasicBlock *Block1, Address Addr2, llvm::BasicBlock *Block2, const llvm::Twine &Name="")
 
bool isEmptyField (ASTContext &Context, const FieldDecl *FD, bool AllowArrays, bool AsIfNoUniqueAddr=false)
 isEmptyField - Return true iff a the field is "empty", that is it is an unnamed bit-field or an (array of) empty record(s).
 
bool isEmptyRecord (ASTContext &Context, QualType T, bool AllowArrays, bool AsIfNoUniqueAddr=false)
 isEmptyRecord - Return true iff a structure contains only empty fields.
 
bool isEmptyFieldForLayout (const ASTContext &Context, const FieldDecl *FD)
 isEmptyFieldForLayout - Return true iff the field is "empty", that is, either a zero-width bit-field or an isEmptyRecordForLayout.
 
bool isEmptyRecordForLayout (const ASTContext &Context, QualType T)
 isEmptyRecordForLayout - Return true iff a structure contains only empty base classes (per isEmptyRecordForLayout) and fields (per isEmptyFieldForLayout).
 
const TypeisSingleElementStruct (QualType T, ASTContext &Context)
 isSingleElementStruct - Determine if a structure is a "single element struct", i.e.
 
Address EmitVAArgInstr (CodeGenFunction &CGF, Address VAListAddr, QualType Ty, const ABIArgInfo &AI)
 
bool isSIMDVectorType (ASTContext &Context, QualType Ty)
 
bool isRecordWithSIMDVectorType (ASTContext &Context, QualType Ty)
 
BlockFlags operator| (BlockLiteralFlags l, BlockLiteralFlags r)
 
BlockFieldFlags operator| (BlockFieldFlag_t l, BlockFieldFlag_t r)
 
void computeSPIRKernelABIInfo (CodeGenModule &CGM, CGFunctionInfo &FI)
 
void mergeDefaultFunctionDefinitionAttributes (llvm::Function &F, const CodeGenOptions &CodeGenOpts, const LangOptions &LangOpts, const TargetOptions &TargetOpts, bool WillInternalize)
 Adds attributes to F according to our CodeGenOpts and LangOpts, as though we had emitted it ourselves.
 
FnInfoOpts operator| (FnInfoOpts A, FnInfoOpts B)
 
FnInfoOpts operator& (FnInfoOpts A, FnInfoOpts B)
 
FnInfoOptsoperator|= (FnInfoOpts &A, FnInfoOpts B)
 
FnInfoOptsoperator&= (FnInfoOpts &A, FnInfoOpts B)
 
CGCUDARuntimeCreateNVCUDARuntime (CodeGenModule &CGM)
 Creates an instance of a CUDA runtime class.
 
CGCXXABICreateItaniumCXXABI (CodeGenModule &CGM)
 Creates an Itanium-family ABI.
 
CGCXXABICreateMicrosoftCXXABI (CodeGenModule &CGM)
 Creates a Microsoft-family ABI.
 
CGObjCRuntimeCreateGNUObjCRuntime (CodeGenModule &CGM)
 Creates an instance of an Objective-C runtime class.
 
CGObjCRuntimeCreateMacObjCRuntime (CodeGenModule &CGM)
 
static AlignmentSource getFieldAlignmentSource (AlignmentSource Source)
 Given that the base address has the given alignment source, what's our confidence in the alignment of the field?
 
llvm::Constant * initializationPatternFor (CodeGenModule &, llvm::Type *)
 
std::unique_ptr< TargetCodeGenInfocreateDefaultTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateAArch64TargetCodeGenInfo (CodeGenModule &CGM, AArch64ABIKind Kind)
 
std::unique_ptr< TargetCodeGenInfocreateWindowsAArch64TargetCodeGenInfo (CodeGenModule &CGM, AArch64ABIKind K)
 
std::unique_ptr< TargetCodeGenInfocreateAMDGPUTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateARCTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateARMTargetCodeGenInfo (CodeGenModule &CGM, ARMABIKind Kind)
 
std::unique_ptr< TargetCodeGenInfocreateWindowsARMTargetCodeGenInfo (CodeGenModule &CGM, ARMABIKind K)
 
std::unique_ptr< TargetCodeGenInfocreateAVRTargetCodeGenInfo (CodeGenModule &CGM, unsigned NPR, unsigned NRR)
 
std::unique_ptr< TargetCodeGenInfocreateBPFTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateCSKYTargetCodeGenInfo (CodeGenModule &CGM, unsigned FLen)
 
std::unique_ptr< TargetCodeGenInfocreateHexagonTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateLanaiTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateLoongArchTargetCodeGenInfo (CodeGenModule &CGM, unsigned GRLen, unsigned FLen)
 
std::unique_ptr< TargetCodeGenInfocreateM68kTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateMIPSTargetCodeGenInfo (CodeGenModule &CGM, bool IsOS32)
 
std::unique_ptr< TargetCodeGenInfocreateMSP430TargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateNVPTXTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreatePNaClTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateAIXTargetCodeGenInfo (CodeGenModule &CGM, bool Is64Bit)
 
std::unique_ptr< TargetCodeGenInfocreatePPC32TargetCodeGenInfo (CodeGenModule &CGM, bool SoftFloatABI)
 
std::unique_ptr< TargetCodeGenInfocreatePPC64TargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreatePPC64_SVR4_TargetCodeGenInfo (CodeGenModule &CGM, PPC64_SVR4_ABIKind Kind, bool SoftFloatABI)
 
std::unique_ptr< TargetCodeGenInfocreateRISCVTargetCodeGenInfo (CodeGenModule &CGM, unsigned XLen, unsigned FLen, bool EABI)
 
std::unique_ptr< TargetCodeGenInfocreateCommonSPIRTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateSPIRVTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateSparcV8TargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateSparcV9TargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateSystemZTargetCodeGenInfo (CodeGenModule &CGM, bool HasVector, bool SoftFloatABI)
 
std::unique_ptr< TargetCodeGenInfocreateTCETargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateVETargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateDirectXTargetCodeGenInfo (CodeGenModule &CGM)
 
std::unique_ptr< TargetCodeGenInfocreateWebAssemblyTargetCodeGenInfo (CodeGenModule &CGM, WebAssemblyABIKind K)
 
std::unique_ptr< TargetCodeGenInfocreateX86_32TargetCodeGenInfo (CodeGenModule &CGM, bool DarwinVectorABI, bool Win32StructABI, unsigned NumRegisterParameters, bool SoftFloatABI)
 
std::unique_ptr< TargetCodeGenInfocreateWinX86_32TargetCodeGenInfo (CodeGenModule &CGM, bool DarwinVectorABI, bool Win32StructABI, unsigned NumRegisterParameters)
 
std::unique_ptr< TargetCodeGenInfocreateX86_64TargetCodeGenInfo (CodeGenModule &CGM, X86AVXABILevel AVXLevel)
 
std::unique_ptr< TargetCodeGenInfocreateWinX86_64TargetCodeGenInfo (CodeGenModule &CGM, X86AVXABILevel AVXLevel)
 
std::unique_ptr< TargetCodeGenInfocreateXCoreTargetCodeGenInfo (CodeGenModule &CGM)
 

Typedef Documentation

◆ CGBuilderBaseTy

typedef llvm::IRBuilder<llvm::ConstantFolder, CGBuilderInserterTy> clang::CodeGen::CGBuilderBaseTy

Definition at line 48 of file CGBuilder.h.

◆ CGBuilderInserterTy

Definition at line 45 of file CGBuilder.h.

Enumeration Type Documentation

◆ AArch64ABIKind

enum class clang::CodeGen::AArch64ABIKind
strong
Enumerator
AAPCS 
DarwinPCS 
Win64 
AAPCSSoft 
PAuthTest 

Definition at line 467 of file TargetInfo.h.

◆ AlignmentSource

The source of the alignment of an l-value; an expression of confidence in the alignment actually matching the estimate.

Enumerator
Decl 

The l-value was an access to a declared entity or something equivalently strong, like the address of an array allocated by a language runtime.

AttributedType 

The l-value was considered opaque, so the alignment was determined from a type, but that type was an explicitly-aligned typedef.

Type 

The l-value was considered opaque, so the alignment was determined from a type.

Definition at line 141 of file CGValue.h.

◆ ARCPreciseLifetime_t

Does an ARC strong l-value have precise lifetime?

Enumerator
ARCImpreciseLifetime 
ARCPreciseLifetime 

Definition at line 135 of file CGValue.h.

◆ ARMABIKind

enum class clang::CodeGen::ARMABIKind
strong
Enumerator
APCS 
AAPCS 
AAPCS_VFP 
AAPCS16_VFP 

Definition at line 487 of file TargetInfo.h.

◆ BlockByrefFlags

Enumerator
BLOCK_BYREF_HAS_COPY_DISPOSE 
BLOCK_BYREF_LAYOUT_MASK 
BLOCK_BYREF_LAYOUT_EXTENDED 
BLOCK_BYREF_LAYOUT_NON_OBJECT 
BLOCK_BYREF_LAYOUT_STRONG 
BLOCK_BYREF_LAYOUT_WEAK 
BLOCK_BYREF_LAYOUT_UNRETAINED 

Definition at line 38 of file CGBlocks.h.

◆ BlockCaptureEntityKind

Represents a type of copy/destroy operation that should be performed for an entity that's captured by a block.

Enumerator
None 
CXXRecord 
ARCWeak 
ARCStrong 
NonTrivialCStruct 
BlockObject 

Definition at line 146 of file CGBlocks.h.

◆ BlockFieldFlag_t

Enumerator
BLOCK_FIELD_IS_OBJECT 
BLOCK_FIELD_IS_BLOCK 
BLOCK_FIELD_IS_BYREF 
BLOCK_FIELD_IS_WEAK 
BLOCK_FIELD_IS_ARC 
BLOCK_BYREF_CALLER 
BLOCK_BYREF_CURRENT_MAX 

Definition at line 87 of file CGBlocks.h.

◆ BlockLiteralFlags

Enumerator
BLOCK_IS_NOESCAPE 
BLOCK_HAS_COPY_DISPOSE 
BLOCK_HAS_CXX_OBJ 
BLOCK_IS_GLOBAL 
BLOCK_USE_STRET 
BLOCK_HAS_SIGNATURE 
BLOCK_HAS_EXTENDED_LAYOUT 

Definition at line 48 of file CGBlocks.h.

◆ CleanupKind

Enumerator
EHCleanup 

Denotes a cleanup that should run when a scope is exited using exceptional control flow (a throw statement leading to stack unwinding, ).

NormalCleanup 

Denotes a cleanup that should run when a scope is exited using normal control flow (falling off the end of the scope, return, goto, ...).

NormalAndEHCleanup 
LifetimeMarker 
NormalEHLifetimeMarker 

Definition at line 77 of file EHScopeStack.h.

◆ FnInfoOpts

enum class clang::CodeGen::FnInfoOpts
strong
Enumerator
None 
IsInstanceMethod 
IsChainCall 
IsDelegateCall 

Definition at line 436 of file CGCall.h.

◆ ForDefinition_t

Enumerator
NotForDefinition 
ForDefinition 

Definition at line 100 of file CodeGenModule.h.

◆ KnownNonNull_t

Enumerator
NotKnownNonNull 
KnownNonNull 

Definition at line 33 of file Address.h.

◆ PPC64_SVR4_ABIKind

Enumerator
ELFv1 
ELFv2 

Definition at line 534 of file TargetInfo.h.

◆ SanitizerHandler

Enumerator
LIST_SANITIZER_CHECKS 

Definition at line 143 of file CodeGenFunction.h.

◆ TBAAAccessKind

Enumerator
Ordinary 
MayAlias 
Incomplete 

Definition at line 35 of file CodeGenTBAA.h.

◆ TypeEvaluationKind

The kind of evaluation to perform on values of a particular type.

Basically, is the code in CGExprScalar, CGExprComplex, or CGExprAgg?

TODO: should vectors maybe be split out into their own thing?

Enumerator
TEK_Scalar 
TEK_Complex 
TEK_Aggregate 

Definition at line 109 of file CodeGenFunction.h.

◆ WebAssemblyABIKind

Enumerator
MVP 
ExperimentalMV 

Definition at line 581 of file TargetInfo.h.

◆ X86AVXABILevel

enum class clang::CodeGen::X86AVXABILevel
strong

The AVX ABI level for X86 targets.

Enumerator
None 
AVX 
AVX512 

Definition at line 590 of file TargetInfo.h.

Function Documentation

◆ addDefaultFunctionDefinitionAttributes()

void clang::CodeGen::addDefaultFunctionDefinitionAttributes ( CodeGenModule CGM,
llvm::AttrBuilder &  attrs 
)

Given the language and code-generation options that Clang was configured with, set the default LLVM IR attributes for a function definition.

The attributes set here are mostly global target-configuration and pipeline-configuration options like the target CPU, variant stack rules, whether to optimize for size, and so on. This is useful for frontends (such as Swift) that generally intend to interoperate with C code and rely on Clang's target configuration logic.

As a general rule, this function assumes that meaningful attributes haven't already been added to the builder. It won't intentionally displace any existing attributes, but it also won't check to avoid overwriting them. Callers should generally apply customizations after making this call.

This function assumes that the caller is not defining a function that requires special no-builtin treatment.

Definition at line 28 of file CodeGenABITypes.cpp.

References clang::CodeGen::CodeGenModule::addDefaultFunctionDefinitionAttributes().

◆ arrangeCXXMethodCall()

const CGFunctionInfo & clang::CodeGen::arrangeCXXMethodCall ( CodeGenModule CGM,
CanQualType  returnType,
ArrayRef< CanQualType argTypes,
FunctionType::ExtInfo  info,
ArrayRef< FunctionProtoType::ExtParameterInfo paramInfos,
RequiredArgs  args 
)

◆ arrangeCXXMethodType()

const CGFunctionInfo & clang::CodeGen::arrangeCXXMethodType ( CodeGenModule CGM,
const CXXRecordDecl RD,
const FunctionProtoType FTP,
const CXXMethodDecl MD 
)

◆ arrangeFreeFunctionCall() [1/2]

const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionCall ( CodeGenModule CGM,
CanQualType  returnType,
ArrayRef< CanQualType argTypes,
FunctionType::ExtInfo  info,
ArrayRef< FunctionProtoType::ExtParameterInfo paramInfos,
RequiredArgs  args 
)

◆ arrangeFreeFunctionCall() [2/2]

const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionCall ( CodeGenModule CGM,
CanQualType  returnType,
ArrayRef< CanQualType argTypes,
FunctionType::ExtInfo  info,
RequiredArgs  args 
)
inline

Definition at line 92 of file CodeGenABITypes.h.

References arrangeFreeFunctionCall().

◆ arrangeFreeFunctionType() [1/2]

const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionType ( CodeGenModule CGM,
CanQual< FunctionNoProtoType Ty 
)

◆ arrangeFreeFunctionType() [2/2]

const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionType ( CodeGenModule CGM,
CanQual< FunctionProtoType Ty 
)

◆ arrangeObjCMessageSendSignature()

const CGFunctionInfo & clang::CodeGen::arrangeObjCMessageSendSignature ( CodeGenModule CGM,
const ObjCMethodDecl MD,
QualType  receiverType 
)

◆ AssignToArrayRange()

void clang::CodeGen::AssignToArrayRange ( CodeGen::CGBuilderTy Builder,
llvm::Value *  Array,
llvm::Value *  Value,
unsigned  FirstIndex,
unsigned  LastIndex 
)

Definition at line 83 of file ABIInfoImpl.cpp.

References clang::CharUnits::One().

Referenced by PPC_initDwarfEHRegSizeTable().

◆ classifyReturnType()

bool clang::CodeGen::classifyReturnType ( const CGCXXABI CXXABI,
CGFunctionInfo FI,
const ABIInfo Info 
)

◆ computeSPIRKernelABIInfo()

void clang::CodeGen::computeSPIRKernelABIInfo ( CodeGenModule CGM,
CGFunctionInfo FI 
)

◆ convertFreeFunctionType()

llvm::FunctionType * clang::CodeGen::convertFreeFunctionType ( CodeGenModule CGM,
const FunctionDecl FD 
)

Returns null if the function type is incomplete and can't be lowered.

Definition at line 104 of file CodeGenABITypes.cpp.

References clang::CodeGen::CodeGenTypes::ConvertType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::T.

◆ convertTypeForMemory()

llvm::Type * clang::CodeGen::convertTypeForMemory ( CodeGenModule CGM,
QualType  T 
)

◆ createAArch64TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createAArch64TargetCodeGenInfo ( CodeGenModule CGM,
AArch64ABIKind  Kind 
)

Definition at line 1280 of file AArch64.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createAIXTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createAIXTargetCodeGenInfo ( CodeGenModule CGM,
bool  Is64Bit 
)

Definition at line 1031 of file PPC.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createAMDGPUTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createAMDGPUTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 730 of file AMDGPU.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createARCTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createARCTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 156 of file ARC.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createARMTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createARMTargetCodeGenInfo ( CodeGenModule CGM,
ARMABIKind  Kind 
)

Definition at line 797 of file ARM.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createAVRTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createAVRTargetCodeGenInfo ( CodeGenModule CGM,
unsigned  NPR,
unsigned  NRR 
)

Definition at line 151 of file AVR.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createBPFTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createBPFTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 98 of file BPF.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createCommonSPIRTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createCommonSPIRTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 406 of file SPIR.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createCSKYTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createCSKYTargetCodeGenInfo ( CodeGenModule CGM,
unsigned  FLen 
)

Definition at line 171 of file CSKY.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createDefaultTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createDefaultTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 264 of file TargetInfo.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createDirectXTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createDirectXTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 72 of file DirectX.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ CreateGNUObjCRuntime()

CGObjCRuntime * clang::CodeGen::CreateGNUObjCRuntime ( CodeGenModule CGM)

◆ createHexagonTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createHexagonTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 424 of file Hexagon.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ CreateItaniumCXXABI()

CodeGen::CGCXXABI * clang::CodeGen::CreateItaniumCXXABI ( CodeGenModule CGM)

Creates an Itanium-family ABI.

Definition at line 556 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and clang::ASTContext::getCXXABIKind().

◆ createLanaiTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createLanaiTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 152 of file Lanai.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createLoongArchTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createLoongArchTargetCodeGenInfo ( CodeGenModule CGM,
unsigned  GRLen,
unsigned  FLen 
)

Definition at line 456 of file LoongArch.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createM68kTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createM68kTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 53 of file M68k.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ CreateMacObjCRuntime()

CGObjCRuntime * clang::CodeGen::CreateMacObjCRuntime ( CodeGenModule CGM)

◆ CreateMicrosoftCXXABI()

CGCXXABI * clang::CodeGen::CreateMicrosoftCXXABI ( CodeGenModule CGM)

Creates a Microsoft-family ABI.

Definition at line 3553 of file MicrosoftCXXABI.cpp.

◆ createMIPSTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createMIPSTargetCodeGenInfo ( CodeGenModule CGM,
bool  IsOS32 
)

Definition at line 436 of file Mips.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createMSP430TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createMSP430TargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 95 of file MSP430.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ CreateNVCUDARuntime()

CGCUDARuntime * clang::CodeGen::CreateNVCUDARuntime ( CodeGenModule CGM)

Creates an instance of a CUDA runtime class.

Definition at line 1081 of file CGCUDANV.cpp.

◆ createNVPTXTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createNVPTXTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 386 of file NVPTX.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createPNaClTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createPNaClTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 110 of file PNaCl.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createPPC32TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createPPC32TargetCodeGenInfo ( CodeGenModule CGM,
bool  SoftFloatABI 
)

◆ createPPC64_SVR4_TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createPPC64_SVR4_TargetCodeGenInfo ( CodeGenModule CGM,
PPC64_SVR4_ABIKind  Kind,
bool  SoftFloatABI 
)

Definition at line 1048 of file PPC.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createPPC64TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createPPC64TargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 1044 of file PPC.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createRISCVTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createRISCVTargetCodeGenInfo ( CodeGenModule CGM,
unsigned  XLen,
unsigned  FLen,
bool  EABI 
)

Definition at line 618 of file RISCV.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createSparcV8TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createSparcV8TargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 407 of file Sparc.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createSparcV9TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createSparcV9TargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 412 of file Sparc.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createSPIRVTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createSPIRVTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 411 of file SPIR.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createSystemZTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createSystemZTargetCodeGenInfo ( CodeGenModule CGM,
bool  HasVector,
bool  SoftFloatABI 
)

Definition at line 536 of file SystemZ.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createTCETargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createTCETargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 80 of file TCE.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createVETargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createVETargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 69 of file VE.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createWebAssemblyTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createWebAssemblyTargetCodeGenInfo ( CodeGenModule CGM,
WebAssemblyABIKind  K 
)

Definition at line 170 of file WebAssembly.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createWindowsAArch64TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createWindowsAArch64TargetCodeGenInfo ( CodeGenModule CGM,
AArch64ABIKind  K 
)

Definition at line 1286 of file AArch64.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createWindowsARMTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createWindowsARMTargetCodeGenInfo ( CodeGenModule CGM,
ARMABIKind  K 
)

Definition at line 802 of file ARM.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createWinX86_32TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createWinX86_32TargetCodeGenInfo ( CodeGenModule CGM,
bool  DarwinVectorABI,
bool  Win32StructABI,
unsigned  NumRegisterParameters 
)

◆ createWinX86_64TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createWinX86_64TargetCodeGenInfo ( CodeGenModule CGM,
X86AVXABILevel  AVXLevel 
)

Definition at line 3484 of file X86.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createX86_32TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createX86_32TargetCodeGenInfo ( CodeGenModule CGM,
bool  DarwinVectorABI,
bool  Win32StructABI,
unsigned  NumRegisterParameters,
bool  SoftFloatABI 
)

◆ createX86_64TargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createX86_64TargetCodeGenInfo ( CodeGenModule CGM,
X86AVXABILevel  AVXLevel 
)

Definition at line 3478 of file X86.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ createXCoreTargetCodeGenInfo()

std::unique_ptr< TargetCodeGenInfo > clang::CodeGen::createXCoreTargetCodeGenInfo ( CodeGenModule CGM)

Definition at line 660 of file XCore.cpp.

References clang::CodeGen::CodeGenModule::getTypes().

Referenced by createTargetCodeGenInfo().

◆ emitMergePHI()

Address clang::CodeGen::emitMergePHI ( CodeGenFunction CGF,
Address  Addr1,
llvm::BasicBlock *  Block1,
Address  Addr2,
llvm::BasicBlock *  Block2,
const llvm::Twine &  Name = "" 
)

◆ emitObjCProtocolObject()

llvm::Constant * clang::CodeGen::emitObjCProtocolObject ( CodeGenModule CGM,
const ObjCProtocolDecl p 
)

Get a pointer to a protocol object for the given declaration, emitting it if it hasn't already been emitted in this translation unit.

Note that the ABI for emitting a protocol reference in code (e.g. for a protocol expression) in most runtimes is not as simple as just materializing a pointer to this object.

Definition at line 464 of file CGObjCRuntime.cpp.

References clang::CodeGen::CodeGenModule::getObjCRuntime(), and clang::CodeGen::CGObjCRuntime::GetOrEmitProtocol().

◆ emitRoundPointerUpToAlignment()

llvm::Value * clang::CodeGen::emitRoundPointerUpToAlignment ( CodeGenFunction CGF,
llvm::Value *  Ptr,
CharUnits  Align 
)

◆ EmitVAArgInstr()

Address clang::CodeGen::EmitVAArgInstr ( CodeGenFunction CGF,
Address  VAListAddr,
QualType  Ty,
const ABIArgInfo AI 
)

◆ emitVoidPtrDirectVAArg()

Address clang::CodeGen::emitVoidPtrDirectVAArg ( CodeGenFunction CGF,
Address  VAListAddr,
llvm::Type *  DirectTy,
CharUnits  DirectSize,
CharUnits  DirectAlign,
CharUnits  SlotSize,
bool  AllowHigherAlign,
bool  ForceRightAdjust = false 
)

Emit va_arg for a platform using the common void* representation, where arguments are simply emitted in an array of slots on the stack.

This version implements the core direct-value passing rules.

Parameters
SlotSize- The size and alignment of a stack slot. Each argument will be allocated to a multiple of this number of slots, and all the slots will be aligned to this value.
AllowHigherAlign- The slot alignment is not a cap; an argument type with an alignment greater than the slot size will be emitted on a higher-alignment address, potentially leaving one or more empty slots behind as padding. If this is false, the returned address might be less-aligned than DirectAlign.
ForceRightAdjust- Default is false. On big-endian platform and if the argument is smaller than a slot, set this flag will force right-adjust the argument in its slot irrespective of the type.

Definition at line 160 of file ABIInfoImpl.cpp.

References clang::CharUnits::alignTo(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::Address::emitRawPointer(), emitRoundPointerUpToAlignment(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::Address::invalid(), and clang::CodeGen::Address::withElementType().

Referenced by complexTempStructure(), and emitVoidPtrVAArg().

◆ emitVoidPtrVAArg()

RValue clang::CodeGen::emitVoidPtrVAArg ( CodeGenFunction CGF,
Address  VAListAddr,
QualType  ValueTy,
bool  IsIndirect,
TypeInfoChars  ValueInfo,
CharUnits  SlotSizeAndAlign,
bool  AllowHigherAlign,
AggValueSlot  Slot,
bool  ForceRightAdjust = false 
)

Emit va_arg for a platform using the common void* representation, where arguments are simply emitted in an array of slots on the stack.

Parameters
IsIndirect- Values of this type are passed indirectly.
ValueInfo- The size and alignment of this type, generally computed with getContext().getTypeInfoInChars(ValueTy).
SlotSizeAndAlign- The size and alignment of a stack slot. Each argument will be allocated to a multiple of this number of slots, and all the slots will be aligned to this value.
AllowHigherAlign- The slot alignment is not a cap; an argument type with an alignment greater than the slot size will be emitted on a higher-alignment address, potentially leaving one or more empty slots behind as padding.
ForceRightAdjust- Default is false. On big-endian platform and if the argument is smaller than a slot, set this flag will force right-adjust the argument in its slot irrespective of the type.

Definition at line 196 of file ABIInfoImpl.cpp.

References clang::TypeInfoChars::Align, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::EmitLoadOfAnyValue(), emitVoidPtrDirectVAArg(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::TypeInfoChars::Width.

◆ getCXXDestructorImplicitParam()

llvm::Value * clang::CodeGen::getCXXDestructorImplicitParam ( CodeGenModule CGM,
llvm::BasicBlock *  InsertBlock,
llvm::BasicBlock::iterator  InsertPoint,
const CXXDestructorDecl D,
CXXDtorType  Type,
bool  ForVirtualBase,
bool  Delegating 
)

◆ getFieldAlignmentSource()

static AlignmentSource clang::CodeGen::getFieldAlignmentSource ( AlignmentSource  Source)
inlinestatic

Given that the base address has the given alignment source, what's our confidence in the alignment of the field?

Definition at line 159 of file CGValue.h.

◆ getImplicitCXXConstructorArgs()

ImplicitCXXConstructorArgs clang::CodeGen::getImplicitCXXConstructorArgs ( CodeGenModule CGM,
const CXXConstructorDecl D 
)

◆ getLLVMFieldNumber()

unsigned clang::CodeGen::getLLVMFieldNumber ( CodeGenModule CGM,
const RecordDecl RD,
const FieldDecl FD 
)

Given a non-bitfield struct field, return its index within the elements of the struct's converted type.

The returned index refers to a field number in the complete object type which is returned by convertTypeForMemory. FD must be a field in RD directly (i.e. not an inherited field).

Definition at line 119 of file CodeGenABITypes.cpp.

References clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), and clang::CodeGen::CodeGenModule::getTypes().

◆ getNonTrivialCStructCopyAssignmentOperator()

llvm::Function * clang::CodeGen::getNonTrivialCStructCopyAssignmentOperator ( CodeGenModule CGM,
CharUnits  DstAlignment,
CharUnits  SrcAlignment,
bool  IsVolatile,
QualType  QT 
)

Returns the copy assignment operator for a C struct with non-trivially copyable fields, generating it if necessary.

The returned function uses the cdecl calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.

Definition at line 961 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().

◆ getNonTrivialCStructCopyConstructor()

llvm::Function * clang::CodeGen::getNonTrivialCStructCopyConstructor ( CodeGenModule CGM,
CharUnits  DstAlignment,
CharUnits  SrcAlignment,
bool  IsVolatile,
QualType  QT 
)

Returns the copy constructor for a C struct with non-trivially copyable fields, generating it if necessary.

The returned function uses the cdecl calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.

Definition at line 937 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().

◆ getNonTrivialCStructDefaultConstructor()

llvm::Function * clang::CodeGen::getNonTrivialCStructDefaultConstructor ( CodeGenModule GCM,
CharUnits  DstAlignment,
bool  IsVolatile,
QualType  QT 
)

Returns the default constructor for a C struct with non-trivially copyable fields, generating it if necessary.

The returned function uses the cdecl calling convention, returns void, and takes a single argument that is a pointer to the address of the struct.

Definition at line 928 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().

◆ getNonTrivialCStructDestructor()

llvm::Function * clang::CodeGen::getNonTrivialCStructDestructor ( CodeGenModule CGM,
CharUnits  DstAlignment,
bool  IsVolatile,
QualType  QT 
)

Returns the destructor for a C struct with non-trivially copyable fields, generating it if necessary.

The returned function uses the cdecl calling convention, returns void, and takes a single argument that is a pointer to the address of the struct.

Definition at line 985 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().

◆ getNonTrivialCStructMoveAssignmentOperator()

llvm::Function * clang::CodeGen::getNonTrivialCStructMoveAssignmentOperator ( CodeGenModule CGM,
CharUnits  DstAlignment,
CharUnits  SrcAlignment,
bool  IsVolatile,
QualType  QT 
)

Return the move assignment operator for a C struct with non-trivially copyable fields, generating it if necessary.

The returned function uses the cdecl calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.

Definition at line 973 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().

◆ getNonTrivialCStructMoveConstructor()

llvm::Function * clang::CodeGen::getNonTrivialCStructMoveConstructor ( CodeGenModule CGM,
CharUnits  DstAlignment,
CharUnits  SrcAlignment,
bool  IsVolatile,
QualType  QT 
)

Returns the move constructor for a C struct with non-trivially copyable fields, generating it if necessary.

The returned function uses the cdecl calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.

Definition at line 949 of file CGNonTrivialStruct.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().

◆ getPointerAuthDeclDiscriminator()

uint16_t clang::CodeGen::getPointerAuthDeclDiscriminator ( CodeGenModule CGM,
GlobalDecl  GD 
)

Return a declaration discriminator for the given global decl.

Definition at line 54 of file CGPointerAuth.cpp.

References clang::Declaration, and clang::CodeGen::CodeGenModule::getPointerAuthDeclDiscriminator().

◆ getPointerAuthTypeDiscriminator()

uint16_t clang::CodeGen::getPointerAuthTypeDiscriminator ( CodeGenModule CGM,
QualType  FunctionType 
)

Return a type discriminator for the given function type.

Definition at line 49 of file CGPointerAuth.cpp.

References clang::CodeGen::CodeGenModule::getContext(), and clang::ASTContext::getPointerAuthTypeDiscriminator().

Referenced by clang::CodeGen::CodeGenModule::getPointerAuthOtherDiscriminator().

◆ getRecordArgABI() [1/2]

CGCXXABI::RecordArgABI clang::CodeGen::getRecordArgABI ( const RecordType RT,
CGCXXABI CXXABI 
)

◆ getRecordArgABI() [2/2]

CGCXXABI::RecordArgABI clang::CodeGen::getRecordArgABI ( QualType  T,
CGCXXABI CXXABI 
)

◆ getVAListElementType()

llvm::Type * clang::CodeGen::getVAListElementType ( CodeGenFunction CGF)

◆ initializationPatternFor()

llvm::Constant * clang::CodeGen::initializationPatternFor ( CodeGenModule CGM,
llvm::Type *  Ty 
)

◆ isAggregateTypeForABI()

bool clang::CodeGen::isAggregateTypeForABI ( QualType  T)

◆ isEmptyField()

bool clang::CodeGen::isEmptyField ( ASTContext Context,
const FieldDecl FD,
bool  AllowArrays,
bool  AsIfNoUniqueAddr = false 
)

isEmptyField - Return true iff a the field is "empty", that is it is an unnamed bit-field or an (array of) empty record(s).

If AsIfNoUniqueAddr is true, then C++ record fields are considered empty if the [[no_unique_address]] attribute would have made them empty.

Definition at line 242 of file ABIInfoImpl.cpp.

References clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::RecordType::getDecl(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), isEmptyRecord(), and clang::FieldDecl::isUnnamedBitField().

Referenced by isEmptyRecord(), and isSingleElementStruct().

◆ isEmptyFieldForLayout()

bool clang::CodeGen::isEmptyFieldForLayout ( const ASTContext Context,
const FieldDecl FD 
)

◆ isEmptyRecord()

bool clang::CodeGen::isEmptyRecord ( ASTContext Context,
QualType  T,
bool  AllowArrays,
bool  AsIfNoUniqueAddr = false 
)

isEmptyRecord - Return true iff a structure contains only empty fields.

Note that a structure with a flexible array member is not considered empty. If AsIfNoUniqueAddr is true, then C++ record fields are considered empty if the [[no_unique_address]] attribute would have made them empty.

Definition at line 283 of file ABIInfoImpl.cpp.

References clang::RecordDecl::fields(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::RecordDecl::hasFlexibleArrayMember(), isEmptyField(), isEmptyRecord(), and clang::T.

Referenced by isEmptyField(), isEmptyRecord(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), and isSingleElementStruct().

◆ isEmptyRecordForLayout()

bool clang::CodeGen::isEmptyRecordForLayout ( const ASTContext Context,
QualType  T 
)

isEmptyRecordForLayout - Return true iff a structure contains only empty base classes (per isEmptyRecordForLayout) and fields (per isEmptyFieldForLayout).

Note, C++ record fields are considered empty if the [[no_unique_address]] attribute would have made them empty.

Definition at line 315 of file ABIInfoImpl.cpp.

References clang::RecordDecl::fields(), clang::Type::getAs(), clang::RecordType::getDecl(), isEmptyFieldForLayout(), isEmptyRecordForLayout(), and clang::T.

Referenced by EmitNullConstant(), isEmptyFieldForLayout(), and isEmptyRecordForLayout().

◆ isRecordWithSIMDVectorType()

bool clang::CodeGen::isRecordWithSIMDVectorType ( ASTContext Context,
QualType  Ty 
)

◆ isSIMDVectorType()

bool clang::CodeGen::isSIMDVectorType ( ASTContext Context,
QualType  Ty 
)

Definition at line 455 of file ABIInfoImpl.cpp.

References clang::Type::getAs(), and clang::ASTContext::getTypeSize().

Referenced by isRecordWithSIMDVectorType().

◆ isSingleElementStruct()

const Type * clang::CodeGen::isSingleElementStruct ( QualType  T,
ASTContext Context 
)

isSingleElementStruct - Determine if a structure is a "single element struct", i.e.

it has exactly one non-empty field or exactly one field which is itself a single element struct. Structures with flexible array members are never considered single element structs.

Returns
The field declaration for the single non-empty field, if it exists.

Definition at line 339 of file ABIInfoImpl.cpp.

References clang::RecordDecl::fields(), clang::Found, clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::RecordType::getDecl(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSize(), clang::RecordDecl::hasFlexibleArrayMember(), isAggregateTypeForABI(), isEmptyField(), isEmptyRecord(), isSingleElementStruct(), and clang::T.

Referenced by isSingleElementStruct().

◆ mergeDefaultFunctionDefinitionAttributes()

void clang::CodeGen::mergeDefaultFunctionDefinitionAttributes ( llvm::Function &  F,
const CodeGenOptions CodeGenOpts,
const LangOptions LangOpts,
const TargetOptions TargetOpts,
bool  WillInternalize 
)

Adds attributes to F according to our CodeGenOpts and LangOpts, as though we had emitted it ourselves.

We remove any attributes on F that conflict with the attributes we add here.

This is useful for adding attrs to bitcode modules that you want to link with but don't control, such as CUDA's libdevice. When linking with such a bitcode library, you might want to set e.g. its functions' "unsafe-fp-math" attribute to match the attr of the functions you're codegen'ing. Otherwise, LLVM will interpret the bitcode module's lack of unsafe-fp-math attrs as tantamount to unsafe-fp-math=false, and then LLVM will propagate unsafe-fp-math=false up to every transitive caller of a function in the bitcode library!

With the exception of fast-math attrs, this will only make the attributes on the function more conservative. But it's unsafe to call this on a function which relies on particular fast-math attributes for correctness. It's up to you to ensure that this is safe.

Definition at line 2076 of file CGCall.cpp.

References addDenormalModeAttrs(), clang::TargetOptions::CPU, clang::CodeGenOptions::FP32DenormalMode, clang::CodeGenOptions::FPDenormalMode, getTrivialDefaultFunctionAttributes(), overrideFunctionFeaturesWithTargetFeatures(), and clang::TargetOptions::TuneCPU.

Referenced by clang::BackendConsumer::LinkInModules().

◆ operator&()

FnInfoOpts clang::CodeGen::operator& ( FnInfoOpts  A,
FnInfoOpts  B 
)
inline

Definition at line 448 of file CGCall.h.

◆ operator&=()

FnInfoOpts & clang::CodeGen::operator&= ( FnInfoOpts A,
FnInfoOpts  B 
)
inline

Definition at line 458 of file CGCall.h.

◆ operator|() [1/3]

BlockFieldFlags clang::CodeGen::operator| ( BlockFieldFlag_t  l,
BlockFieldFlag_t  r 
)
inline

Definition at line 131 of file CGBlocks.h.

◆ operator|() [2/3]

BlockFlags clang::CodeGen::operator| ( BlockLiteralFlags  l,
BlockLiteralFlags  r 
)
inline

Definition at line 83 of file CGBlocks.h.

◆ operator|() [3/3]

FnInfoOpts clang::CodeGen::operator| ( FnInfoOpts  A,
FnInfoOpts  B 
)
inline

Definition at line 443 of file CGCall.h.

◆ operator|=()

FnInfoOpts & clang::CodeGen::operator|= ( FnInfoOpts A,
FnInfoOpts  B 
)
inline

Definition at line 453 of file CGCall.h.

◆ useFirstFieldIfTransparentUnion()

QualType clang::CodeGen::useFirstFieldIfTransparentUnion ( QualType  Ty)

Pass transparent unions as if they were the type of the first element.

Sema should ensure that all elements of the union have the same "machine type".

Definition at line 136 of file ABIInfoImpl.cpp.

References clang::RecordDecl::field_begin(), clang::RecordDecl::field_empty(), clang::Type::getAsUnionType(), and clang::Decl::hasAttr().

Referenced by clang::CodeGen::DefaultABIInfo::classifyArgumentType().