|
clang
5.0.0
|
This class organizes the cross-function state that is used while generating LLVM code. More...
Classes | |
| struct | Structor |
Public Types | |
| typedef std::vector< Structor > | CtorList |
Public Member Functions | |
| CodeGenModule (ASTContext &C, const HeaderSearchOptions &headersearchopts, const PreprocessorOptions &ppopts, const CodeGenOptions &CodeGenOpts, llvm::Module &M, DiagnosticsEngine &Diags, CoverageSourceInfo *CoverageInfo=nullptr) | |
| ~CodeGenModule () | |
| void | clear () |
| void | Release () |
| Finalize LLVM code generation. More... | |
| CGObjCRuntime & | getObjCRuntime () |
| Return a reference to the configured Objective-C runtime. More... | |
| bool | hasObjCRuntime () |
| Return true iff an Objective-C runtime has been configured. More... | |
| CGOpenCLRuntime & | getOpenCLRuntime () |
| Return a reference to the configured OpenCL runtime. More... | |
| CGOpenMPRuntime & | getOpenMPRuntime () |
| Return a reference to the configured OpenMP runtime. More... | |
| CGCUDARuntime & | getCUDARuntime () |
| Return a reference to the configured CUDA runtime. More... | |
| ObjCEntrypoints & | getObjCEntrypoints () const |
| InstrProfStats & | getPGOStats () |
| llvm::IndexedInstrProfReader * | getPGOReader () const |
| CoverageMappingModuleGen * | getCoverageMapping () const |
| llvm::Constant * | getStaticLocalDeclAddress (const VarDecl *D) |
| void | setStaticLocalDeclAddress (const VarDecl *D, llvm::Constant *C) |
| llvm::Constant * | getOrCreateStaticVarDecl (const VarDecl &D, llvm::GlobalValue::LinkageTypes Linkage) |
| llvm::GlobalVariable * | getStaticLocalDeclGuardAddress (const VarDecl *D) |
| void | setStaticLocalDeclGuardAddress (const VarDecl *D, llvm::GlobalVariable *C) |
| bool | lookupRepresentativeDecl (StringRef MangledName, GlobalDecl &Result) const |
| llvm::Constant * | getAtomicSetterHelperFnMap (QualType Ty) |
| void | setAtomicSetterHelperFnMap (QualType Ty, llvm::Constant *Fn) |
| llvm::Constant * | getAtomicGetterHelperFnMap (QualType Ty) |
| void | setAtomicGetterHelperFnMap (QualType Ty, llvm::Constant *Fn) |
| llvm::Constant * | getTypeDescriptorFromMap (QualType Ty) |
| void | setTypeDescriptorInMap (QualType Ty, llvm::Constant *C) |
| CGDebugInfo * | getModuleDebugInfo () |
| llvm::MDNode * | getNoObjCARCExceptionsMetadata () |
| ASTContext & | getContext () const |
| const LangOptions & | getLangOpts () const |
| const HeaderSearchOptions & | getHeaderSearchOpts () const |
| const PreprocessorOptions & | getPreprocessorOpts () const |
| const CodeGenOptions & | getCodeGenOpts () const |
| llvm::Module & | getModule () const |
| DiagnosticsEngine & | getDiags () const |
| const llvm::DataLayout & | getDataLayout () const |
| const TargetInfo & | getTarget () const |
| const llvm::Triple & | getTriple () const |
| bool | supportsCOMDAT () const |
| void | maybeSetTrivialComdat (const Decl &D, llvm::GlobalObject &GO) |
| CGCXXABI & | getCXXABI () const |
| llvm::LLVMContext & | getLLVMContext () |
| bool | shouldUseTBAA () const |
| const TargetCodeGenInfo & | getTargetCodeGenInfo () |
| CodeGenTypes & | getTypes () |
| CodeGenVTables & | getVTables () |
| ItaniumVTableContext & | getItaniumVTableContext () |
| MicrosoftVTableContext & | getMicrosoftVTableContext () |
| CtorList & | getGlobalCtors () |
| CtorList & | getGlobalDtors () |
| llvm::MDNode * | getTBAAInfo (QualType QTy) |
| llvm::MDNode * | getTBAAInfoForVTablePtr () |
| llvm::MDNode * | getTBAAStructInfo (QualType QTy) |
| llvm::MDNode * | getTBAAStructTagInfo (QualType BaseTy, llvm::MDNode *AccessN, uint64_t O) |
| Return the path-aware tag for given base type, access node and offset. More... | |
| bool | isTypeConstant (QualType QTy, bool ExcludeCtorDtor) |
| isTypeConstant - Determine whether an object of this type can be emitted as a constant. More... | |
| bool | isPaddedAtomicType (QualType type) |
| bool | isPaddedAtomicType (const AtomicType *type) |
| void | DecorateInstructionWithTBAA (llvm::Instruction *Inst, llvm::MDNode *TBAAInfo, bool ConvertTypeToTag=true) |
| Decorate the instruction with a TBAA tag. More... | |
| void | DecorateInstructionWithInvariantGroup (llvm::Instruction *I, const CXXRecordDecl *RD) |
| Adds !invariant.barrier !tag to instruction. More... | |
| llvm::ConstantInt * | getSize (CharUnits numChars) |
| Emit the given number of characters as a value of type size_t. More... | |
| void | setGlobalVisibility (llvm::GlobalValue *GV, const NamedDecl *D) const |
| Set the visibility for the given LLVM GlobalValue. More... | |
| void | setTLSMode (llvm::GlobalValue *GV, const VarDecl &D) const |
| Set the TLS mode for the given LLVM GlobalValue for the thread-local variable declaration D. More... | |
| llvm::Constant * | GetAddrOfGlobal (GlobalDecl GD, ForDefinition_t IsForDefinition=NotForDefinition) |
| llvm::GlobalVariable * | CreateOrReplaceCXXRuntimeVariable (StringRef Name, llvm::Type *Ty, llvm::GlobalValue::LinkageTypes Linkage) |
| Will return a global variable of the given type. More... | |
| llvm::Function * | CreateGlobalInitOrDestructFunction (llvm::FunctionType *ty, const Twine &name, const CGFunctionInfo &FI, SourceLocation Loc=SourceLocation(), bool TLS=false) |
| unsigned | GetGlobalVarAddressSpace (const VarDecl *D) |
| Return the AST address space of the underlying global variable for D, as determined by its declaration. More... | |
| llvm::Constant * | GetAddrOfGlobalVar (const VarDecl *D, llvm::Type *Ty=nullptr, ForDefinition_t IsForDefinition=NotForDefinition) |
| Return the llvm::Constant for the address of the given global variable. More... | |
| llvm::Constant * | GetAddrOfFunction (GlobalDecl GD, llvm::Type *Ty=nullptr, bool ForVTable=false, bool DontDefer=false, ForDefinition_t IsForDefinition=NotForDefinition) |
| Return the address of the given function. More... | |
| llvm::Constant * | GetAddrOfRTTIDescriptor (QualType Ty, bool ForEH=false) |
| Get the address of the RTTI descriptor for the given type. More... | |
| ConstantAddress | GetAddrOfUuidDescriptor (const CXXUuidofExpr *E) |
| Get the address of a uuid descriptor . More... | |
| llvm::Constant * | GetAddrOfThunk (GlobalDecl GD, const ThunkInfo &Thunk) |
| Get the address of the thunk for the given global decl. More... | |
| ConstantAddress | GetWeakRefReference (const ValueDecl *VD) |
| Get a reference to the target of VD. More... | |
| CharUnits | getClassPointerAlignment (const CXXRecordDecl *CD) |
| Returns the assumed alignment of an opaque pointer to the given class. More... | |
| CharUnits | getVBaseAlignment (CharUnits DerivedAlign, const CXXRecordDecl *Derived, const CXXRecordDecl *VBase) |
| Returns the assumed alignment of a virtual base of a class. More... | |
| CharUnits | getDynamicOffsetAlignment (CharUnits ActualAlign, const CXXRecordDecl *Class, CharUnits ExpectedTargetAlign) |
| Given a class pointer with an actual known alignment, and the expected alignment of an object at a dynamic offset w.r.t that pointer, return the alignment to assume at the offset. More... | |
| CharUnits | computeNonVirtualBaseClassOffset (const CXXRecordDecl *DerivedClass, CastExpr::path_const_iterator Start, CastExpr::path_const_iterator End) |
| llvm::Constant * | GetNonVirtualBaseClassOffset (const CXXRecordDecl *ClassDecl, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd) |
| Returns the offset from a derived class to a class. More... | |
| int | getUniqueBlockCount () |
| Fetches the global unique block count. More... | |
| llvm::Type * | getBlockDescriptorType () |
| Fetches the type of a generic block descriptor. More... | |
| llvm::Type * | getGenericBlockLiteralType () |
| The type of a generic block literal. More... | |
| llvm::Constant * | GetAddrOfGlobalBlock (const BlockExpr *BE, StringRef Name) |
| Gets the address of a block which requires no captures. More... | |
| llvm::Constant * | getAddrOfGlobalBlockIfEmitted (const BlockExpr *BE) |
| Returns the address of a block which requires no caputres, or null if we've yet to emit the block for BE. More... | |
| void | setAddrOfGlobalBlock (const BlockExpr *BE, llvm::Constant *Addr) |
| Notes that BE's global block is available via Addr. More... | |
| ConstantAddress | GetAddrOfConstantCFString (const StringLiteral *Literal) |
| Return a pointer to a constant CFString object for the given string. More... | |
| ConstantAddress | GetAddrOfConstantString (const StringLiteral *Literal) |
| Return a pointer to a constant NSString object for the given string. More... | |
| llvm::Constant * | GetConstantArrayFromStringLiteral (const StringLiteral *E) |
| Return a constant array for the given string. More... | |
| ConstantAddress | GetAddrOfConstantStringFromLiteral (const StringLiteral *S, StringRef Name=".str") |
| Return a pointer to a constant array for the given string literal. More... | |
| ConstantAddress | GetAddrOfConstantStringFromObjCEncode (const ObjCEncodeExpr *) |
| Return a pointer to a constant array for the given ObjCEncodeExpr node. More... | |
| ConstantAddress | GetAddrOfConstantCString (const std::string &Str, const char *GlobalName=nullptr) |
| Returns a pointer to a character array containing the literal and a terminating '\0' character. More... | |
| ConstantAddress | GetAddrOfConstantCompoundLiteral (const CompoundLiteralExpr *E) |
| Returns a pointer to a constant global variable for the given file-scope compound literal expression. More... | |
| llvm::GlobalVariable * | getAddrOfConstantCompoundLiteralIfEmitted (const CompoundLiteralExpr *E) |
| If it's been emitted already, returns the GlobalVariable corresponding to a compound literal. More... | |
| void | setAddrOfConstantCompoundLiteral (const CompoundLiteralExpr *CLE, llvm::GlobalVariable *GV) |
| Notes that CLE's GlobalVariable is GV. More... | |
| ConstantAddress | GetAddrOfGlobalTemporary (const MaterializeTemporaryExpr *E, const Expr *Inner) |
| Returns a pointer to a global variable representing a temporary with static or thread storage duration. More... | |
| QualType | getObjCFastEnumerationStateType () |
| Retrieve the record type that describes the state of an Objective-C fast enumeration loop (for..in). More... | |
| llvm::Function * | codegenCXXStructor (const CXXMethodDecl *MD, StructorType Type) |
| llvm::Constant * | getAddrOfCXXStructor (const CXXMethodDecl *MD, StructorType Type, const CGFunctionInfo *FnInfo=nullptr, llvm::FunctionType *FnType=nullptr, bool DontDefer=false, ForDefinition_t IsForDefinition=NotForDefinition) |
| Return the address of the constructor/destructor of the given type. More... | |
| llvm::Constant * | getBuiltinLibFunction (const FunctionDecl *FD, unsigned BuiltinID) |
| Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf". More... | |
| llvm::Function * | getIntrinsic (unsigned IID, ArrayRef< llvm::Type * > Tys=None) |
| void | EmitTopLevelDecl (Decl *D) |
| Emit code for a single top level declaration. More... | |
| void | AddDeferredUnusedCoverageMapping (Decl *D) |
| Stored a deferred empty coverage mapping for an unused and thus uninstrumented top level declaration. More... | |
| void | ClearUnusedCoverageMapping (const Decl *D) |
| Remove the deferred empty coverage mapping as this declaration is actually instrumented. More... | |
| void | EmitDeferredUnusedCoverageMappings () |
| Emit all the deferred coverage mappings for the uninstrumented functions. More... | |
| void | HandleCXXStaticMemberVarInstantiation (VarDecl *VD) |
| Tell the consumer that this variable has been instantiated. More... | |
| template<typename SomeDecl > | |
| void | MaybeHandleStaticInExternC (const SomeDecl *D, llvm::GlobalValue *GV) |
| If the declaration has internal linkage but is inside an extern "C" linkage specification, prepare to emit an alias for it to the expected name. More... | |
| void | addUsedGlobal (llvm::GlobalValue *GV) |
| Add a global to a list to be added to the llvm.used metadata. More... | |
| void | addCompilerUsedGlobal (llvm::GlobalValue *GV) |
| Add a global to a list to be added to the llvm.compiler.used metadata. More... | |
| void | AddCXXDtorEntry (llvm::Constant *DtorFn, llvm::Constant *Object) |
| Add a destructor and object to add to the C++ global destructor function. More... | |
| llvm::Constant * | CreateRuntimeFunction (llvm::FunctionType *Ty, StringRef Name, llvm::AttributeList ExtraAttrs=llvm::AttributeList(), bool Local=false) |
| Create a new runtime function with the specified type and name. More... | |
| llvm::Constant * | CreateBuiltinFunction (llvm::FunctionType *Ty, StringRef Name, llvm::AttributeList ExtraAttrs=llvm::AttributeList()) |
| Create a new compiler builtin function with the specified type and name. More... | |
| llvm::Constant * | CreateRuntimeVariable (llvm::Type *Ty, StringRef Name) |
| Create a new runtime global variable with the specified type and name. More... | |
| llvm::Constant * | getLLVMLifetimeStartFn () |
| Lazily declare the .lifetime.start intrinsic. More... | |
| llvm::Constant * | getLLVMLifetimeEndFn () |
| Lazily declare the .lifetime.end intrinsic. More... | |
| void | UpdateCompletedType (const TagDecl *TD) |
| llvm::Constant * | getMemberPointerConstant (const UnaryOperator *e) |
| llvm::Constant * | EmitConstantInit (const VarDecl &D, CodeGenFunction *CGF=nullptr) |
| Try to emit the initializer for the given declaration as a constant; returns 0 if the expression cannot be emitted as a constant. More... | |
| llvm::Constant * | EmitConstantExpr (const Expr *E, QualType DestType, CodeGenFunction *CGF=nullptr) |
| Try to emit the given expression as a constant; returns 0 if the expression cannot be emitted as a constant. More... | |
| llvm::Constant * | EmitConstantValue (const APValue &Value, QualType DestType, CodeGenFunction *CGF=nullptr) |
| Emit the given constant value as a constant, in the type's scalar representation. More... | |
| llvm::Constant * | EmitConstantValueForMemory (const APValue &Value, QualType DestType, CodeGenFunction *CGF=nullptr) |
| Emit the given constant value as a constant, in the type's memory representation. More... | |
| void | EmitExplicitCastExprType (const ExplicitCastExpr *E, CodeGenFunction *CGF=nullptr) |
| Emit type info if type of an expression is a variably modified type. More... | |
| llvm::Constant * | EmitNullConstant (QualType T) |
| Return the result of value-initializing the given type, i.e. More... | |
| llvm::Constant * | EmitNullConstantForBase (const CXXRecordDecl *Record) |
| Return a null constant appropriate for zero-initializing a base class with the given type. More... | |
| void | Error (SourceLocation loc, StringRef error) |
| Emit a general error that something can't be done. More... | |
| void | ErrorUnsupported (const Stmt *S, const char *Type) |
| Print out an error that codegen doesn't support the specified stmt yet. More... | |
| void | ErrorUnsupported (const Decl *D, const char *Type) |
| Print out an error that codegen doesn't support the specified decl yet. More... | |
| void | SetInternalFunctionAttributes (const Decl *D, llvm::Function *F, const CGFunctionInfo &FI) |
| Set the attributes on the LLVM function for the given decl and function info. More... | |
| void | SetLLVMFunctionAttributes (const Decl *D, const CGFunctionInfo &Info, llvm::Function *F) |
| Set the LLVM function attributes (sext, zext, etc). More... | |
| void | SetLLVMFunctionAttributesForDefinition (const Decl *D, llvm::Function *F) |
| Set the LLVM function attributes which only apply to a function definition. More... | |
| bool | ReturnTypeUsesSRet (const CGFunctionInfo &FI) |
| Return true iff the given type uses 'sret' when used as a return type. More... | |
| bool | ReturnSlotInterferesWithArgs (const CGFunctionInfo &FI) |
| Return true iff the given type uses an argument slot when 'sret' is used as a return type. More... | |
| bool | ReturnTypeUsesFPRet (QualType ResultType) |
| Return true iff the given type uses 'fpret' when used as a return type. More... | |
| bool | ReturnTypeUsesFP2Ret (QualType ResultType) |
| Return true iff the given type uses 'fp2ret' when used as a return type. More... | |
| void | ConstructAttributeList (StringRef Name, const CGFunctionInfo &Info, CGCalleeInfo CalleeInfo, llvm::AttributeList &Attrs, unsigned &CallingConv, bool AttrOnCallSite) |
| Get the LLVM attributes and calling convention to use for a particular function type. More... | |
| void | AddDefaultFnAttrs (llvm::Function &F) |
| Adds attributes to F according to our CodeGenOptions and LangOptions, as though we had emitted it ourselves. More... | |
| void | getFunctionFeatureMap (llvm::StringMap< bool > &FeatureMap, const FunctionDecl *FD) |
| StringRef | getMangledName (GlobalDecl GD) |
| StringRef | getBlockMangledName (GlobalDecl GD, const BlockDecl *BD) |
| void | EmitTentativeDefinition (const VarDecl *D) |
| void | EmitVTable (CXXRecordDecl *Class) |
| This is a callback from Sema to tell us that that a particular vtable is required to be emitted in this translation unit. More... | |
| void | RefreshTypeCacheForClass (const CXXRecordDecl *Class) |
| void | AppendLinkerOptions (StringRef Opts) |
| Appends Opts to the "llvm.linker.options" metadata value. More... | |
| void | AddDetectMismatch (StringRef Name, StringRef Value) |
| Appends a detect mismatch command to the linker options. More... | |
| void | AddDependentLib (StringRef Lib) |
| Appends a dependent lib to the "llvm.linker.options" metadata value. More... | |
| llvm::GlobalVariable::LinkageTypes | getFunctionLinkage (GlobalDecl GD) |
| void | setFunctionLinkage (GlobalDecl GD, llvm::Function *F) |
| void | setFunctionDLLStorageClass (GlobalDecl GD, llvm::Function *F) |
| Set the DLL storage class on F. More... | |
| llvm::GlobalVariable::LinkageTypes | getVTableLinkage (const CXXRecordDecl *RD) |
| Return the appropriate linkage for the vtable, VTT, and type information of the given class. More... | |
| CharUnits | GetTargetTypeStoreSize (llvm::Type *Ty) const |
| Return the store size, in character units, of the given LLVM type. More... | |
| llvm::GlobalValue::LinkageTypes | getLLVMLinkageForDeclarator (const DeclaratorDecl *D, GVALinkage Linkage, bool IsConstantVariable) |
| Returns LLVM linkage for a declarator. More... | |
| llvm::GlobalValue::LinkageTypes | getLLVMLinkageVarDefinition (const VarDecl *VD, bool IsConstant) |
| Returns LLVM linkage for a declarator. More... | |
| void | EmitGlobalAnnotations () |
| Emit all the global annotations. More... | |
| llvm::Constant * | EmitAnnotationString (StringRef Str) |
| Emit an annotation string. More... | |
| llvm::Constant * | EmitAnnotationUnit (SourceLocation Loc) |
| Emit the annotation's translation unit. More... | |
| llvm::Constant * | EmitAnnotationLineNo (SourceLocation L) |
| Emit the annotation line number. More... | |
| llvm::Constant * | EmitAnnotateAttr (llvm::GlobalValue *GV, const AnnotateAttr *AA, SourceLocation L) |
| Generate the llvm::ConstantStruct which contains the annotation information for a given GlobalValue. More... | |
| void | AddGlobalAnnotations (const ValueDecl *D, llvm::GlobalValue *GV) |
| Add global annotations that are set on D, for the global GV. More... | |
| bool | isInSanitizerBlacklist (llvm::Function *Fn, SourceLocation Loc) const |
| bool | isInSanitizerBlacklist (llvm::GlobalVariable *GV, SourceLocation Loc, QualType Ty, StringRef Category=StringRef()) const |
| bool | imbueXRayAttrs (llvm::Function *Fn, SourceLocation Loc, StringRef Category=StringRef()) const |
| Imbue XRay attributes to a function, applying the always/never attribute lists in the process. More... | |
| SanitizerMetadata * | getSanitizerMetadata () |
| void | addDeferredVTable (const CXXRecordDecl *RD) |
| void | EmitGlobal (GlobalDecl D) |
| Emit code for a singal global function or var decl. More... | |
| bool | TryEmitDefinitionAsAlias (GlobalDecl Alias, GlobalDecl Target, bool InEveryTU) |
| Try to emit a definition as a global alias for another definition. More... | |
| bool | TryEmitBaseDestructorAsAlias (const CXXDestructorDecl *D) |
| Try to emit a base destructor as an alias to its primary base-class destructor. More... | |
| void | setFunctionDefinitionAttributes (const FunctionDecl *D, llvm::Function *F) |
| Set attributes for a global definition. More... | |
| llvm::GlobalValue * | GetGlobalValue (StringRef Ref) |
| void | SetCommonAttributes (const Decl *D, llvm::GlobalValue *GV) |
| Set attributes which are common to any form of a global definition (alias, Objective-C method, function, global variable). More... | |
| void | setAliasAttributes (const Decl *D, llvm::GlobalValue *GV) |
| Set attributes which must be preserved by an alias. More... | |
| void | addReplacement (StringRef Name, llvm::Constant *C) |
| void | addGlobalValReplacement (llvm::GlobalValue *GV, llvm::Constant *C) |
| void | EmitOMPThreadPrivateDecl (const OMPThreadPrivateDecl *D) |
| Emit a code for threadprivate directive. More... | |
| void | EmitOMPDeclareReduction (const OMPDeclareReductionDecl *D, CodeGenFunction *CGF=nullptr) |
| Emit a code for declare reduction construct. More... | |
| bool | HasHiddenLTOVisibility (const CXXRecordDecl *RD) |
| Returns whether the given record has hidden LTO visibility and therefore may participate in (single-module) CFI and whole-program vtable optimization. More... | |
| void | EmitVTableTypeMetadata (llvm::GlobalVariable *VTable, const VTableLayout &VTLayout) |
| Emit type metadata for the given vtable using the given layout. More... | |
| llvm::ConstantInt * | CreateCrossDsoCfiTypeId (llvm::Metadata *MD) |
| Generate a cross-DSO type identifier for MD. More... | |
| llvm::Metadata * | CreateMetadataIdentifierForType (QualType T) |
| Create a metadata identifier for the given type. More... | |
| void | CreateFunctionTypeMetadata (const FunctionDecl *FD, llvm::Function *F) |
| Create and attach type metadata to the given function. More... | |
| bool | NeedAllVtablesTypeId () const |
| Returns whether this module needs the "all-vtables" type identifier. More... | |
| void | AddVTableTypeMetadata (llvm::GlobalVariable *VTable, CharUnits Offset, const CXXRecordDecl *RD) |
| Create and attach type metadata for the given vtable. More... | |
| llvm::Constant * | getTerminateFn () |
| Get the declaration of std::terminate for the platform. More... | |
| llvm::SanitizerStatReport & | getSanStats () |
| llvm::Value * | createOpenCLIntToSamplerConversion (const Expr *E, CodeGenFunction &CGF) |
| llvm::Constant * | getNullPointer (llvm::PointerType *T, QualType QT) |
| Get target specific null pointer. More... | |
Custom Blocks Runtime Interfaces | |
| llvm::Constant * | getNSConcreteGlobalBlock () |
| llvm::Constant * | getNSConcreteStackBlock () |
| llvm::Constant * | getBlockObjectAssign () |
| llvm::Constant * | getBlockObjectDispose () |
Public Member Functions inherited from clang::CodeGen::CodeGenTypeCache | |
| CharUnits | getIntSize () const |
| CharUnits | getIntAlign () const |
| CharUnits | getSizeSize () const |
| CharUnits | getSizeAlign () const |
| CharUnits | getPointerSize () const |
| CharUnits | getPointerAlign () const |
| llvm::CallingConv::ID | getRuntimeCC () const |
| llvm::CallingConv::ID | getBuiltinCC () const |
| unsigned | getASTAllocaAddressSpace () const |
Static Public Member Functions | |
| static llvm::GlobalValue::VisibilityTypes | GetLLVMVisibility (Visibility V) |
Public Attributes | |
| llvm::Constant * | IsOSVersionAtLeastFn = nullptr |
| llvm::FoldingSet < BlockByrefHelpers > | ByrefHelpersCache |
| int | GlobalUniqueCount |
Public Attributes inherited from clang::CodeGen::CodeGenTypeCache | |
| llvm::Type * | VoidTy |
| void More... | |
| llvm::IntegerType * | Int8Ty |
| i8, i16, i32, and i64 More... | |
| llvm::IntegerType * | Int16Ty |
| llvm::IntegerType * | Int32Ty |
| llvm::IntegerType * | Int64Ty |
| llvm::Type * | FloatTy |
| float, double More... | |
| llvm::Type * | DoubleTy |
| llvm::IntegerType * | IntTy |
| int More... | |
| union { | |
| llvm::IntegerType * IntPtrTy | |
| llvm::IntegerType * SizeTy | |
| llvm::IntegerType * PtrDiffTy | |
| }; | |
| intptr_t, size_t, and ptrdiff_t, which we assume are the same size. More... | |
| union { | |
| llvm::PointerType * VoidPtrTy | |
| llvm::PointerType * Int8PtrTy | |
| }; | |
| void* in address space 0 More... | |
| union { | |
| llvm::PointerType * VoidPtrPtrTy | |
| llvm::PointerType * Int8PtrPtrTy | |
| }; | |
| void** in address space 0 More... | |
| union { | |
| llvm::PointerType * AllocaVoidPtrTy | |
| llvm::PointerType * AllocaInt8PtrTy | |
| }; | |
| void* in alloca address space More... | |
| union { | |
| unsigned char IntSizeInBytes | |
| unsigned char IntAlignInBytes | |
| }; | |
| The size and alignment of the builtin C type 'int'. More... | |
| unsigned char | PointerWidthInBits |
| The width of a pointer into the generic address space. More... | |
| union { | |
| unsigned char PointerAlignInBytes | |
| unsigned char PointerSizeInBytes | |
| }; | |
| The size and alignment of a pointer into the generic address space. More... | |
| union { | |
| unsigned char SizeSizeInBytes | |
| unsigned char SizeAlignInBytes | |
| }; | |
| The size and alignment of size_t. More... | |
| unsigned | ASTAllocaAddressSpace |
| llvm::CallingConv::ID | RuntimeCC |
| llvm::CallingConv::ID | BuiltinCC |
This class organizes the cross-function state that is used while generating LLVM code.
Definition at line 252 of file CodeGenModule.h.
| typedef std::vector<Structor> clang::CodeGen::CodeGenModule::CtorList |
Definition at line 268 of file CodeGenModule.h.
| CodeGenModule::CodeGenModule | ( | ASTContext & | C, |
| const HeaderSearchOptions & | headersearchopts, | ||
| const PreprocessorOptions & | ppopts, | ||
| const CodeGenOptions & | CodeGenOpts, | ||
| llvm::Module & | M, | ||
| DiagnosticsEngine & | Diags, | ||
| CoverageSourceInfo * | CoverageInfo = nullptr |
||
| ) |
Definition at line 83 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, clang::CodeGen::CodeGenTypeCache::ASTAllocaAddressSpace, clang::CodeGen::CodeGenTypeCache::BuiltinCC, clang::serialized_diags::create(), clang::CodeGen::CodeGenTypeCache::DoubleTy, E, clang::DiagnosticsEngine::Error, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::CodeGen::TargetCodeGenInfo::getABIInfo(), clang::CodeGen::TargetCodeGenInfo::getASTAllocaAddressSpace(), clang::CodeGen::ABIInfo::getBuiltinCC(), clang::DiagnosticsEngine::getCustomDiagID(), getCXXABI(), getDiags(), clang::TargetInfo::getIntAlign(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::ASTContext::getLangOpts(), clang::TargetInfo::getMaxPointerWidth(), clang::TargetInfo::getPointerAlign(), clang::TargetInfo::getPointerWidth(), clang::CodeGen::ABIInfo::getRuntimeCC(), getTargetCodeGenInfo(), clang::ASTContext::getTargetInfo(), clang::SanitizerSet::has(), clang::CodeGenOptions::hasProfileClangUse(), clang::CodeGen::CodeGenTypeCache::Int16Ty, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntAlignInBytes, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::codegenoptions::NoDebugInfo, clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, clang::CodeGen::CodeGenTypeCache::PointerWidthInBits, clang::CodeGenOptions::ProfileInstrumentUsePath, clang::DiagnosticsEngine::Report(), clang::CodeGen::CodeGenTypeCache::RuntimeCC, clang::LangOptions::Sanitize, clang::CodeGen::CodeGenTypeCache::SizeSizeInBytes, clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
| CodeGenModule::~CodeGenModule | ( | ) |
Definition at line 168 of file CodeGenModule.cpp.
| void CodeGenModule::addCompilerUsedGlobal | ( | llvm::GlobalValue * | GV | ) |
Add a global to a list to be added to the llvm.compiler.used metadata.
Definition at line 1221 of file CodeGenModule.cpp.
|
inline |
Add a destructor and object to add to the C++ global destructor function.
Definition at line 909 of file CodeGenModule.h.
| void CodeGenModule::AddDefaultFnAttrs | ( | llvm::Function & | F | ) |
Adds attributes to F according to our CodeGenOptions and LangOptions, 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 1764 of file CGCall.cpp.
| void CodeGenModule::AddDeferredUnusedCoverageMapping | ( | Decl * | D | ) |
Stored a deferred empty coverage mapping for an unused and thus uninstrumented top level declaration.
Definition at line 4156 of file CodeGenModule.cpp.
References clang::Decl::getKind(), and I.
Referenced by EmitTopLevelDecl().
|
inline |
Definition at line 1143 of file CodeGenModule.h.
| void CodeGenModule::AddDependentLib | ( | StringRef | Lib | ) |
Appends a dependent lib to the "llvm.linker.options" metadata value.
Definition at line 1270 of file CodeGenModule.cpp.
References clang::CodeGen::TargetCodeGenInfo::getDependentLibraryOption(), getLLVMContext(), and getTargetCodeGenInfo().
Referenced by EmitTopLevelDecl().
| void CodeGenModule::AddDetectMismatch | ( | StringRef | Name, |
| StringRef | Value | ||
| ) |
Appends a detect mismatch command to the linker options.
Definition at line 1263 of file CodeGenModule.cpp.
References clang::CodeGen::TargetCodeGenInfo::getDetectMismatchOption(), getLLVMContext(), and getTargetCodeGenInfo().
Referenced by EmitTopLevelDecl().
| void CodeGenModule::AddGlobalAnnotations | ( | const ValueDecl * | D, |
| llvm::GlobalValue * | GV | ||
| ) |
Add global annotations that are set on D, for the global GV.
Those annotations are emitted during finalization of the LLVM code.
Definition at line 1525 of file CodeGenModule.cpp.
References EmitAnnotateAttr(), clang::Decl::getLocation(), clang::Decl::hasAttr(), I, and clang::Decl::specific_attrs().
Referenced by clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().
| void CodeGenModule::addGlobalValReplacement | ( | llvm::GlobalValue * | GV, |
| llvm::Constant * | C | ||
| ) |
Definition at line 249 of file CodeGenModule.cpp.
| void CodeGenModule::addReplacement | ( | StringRef | Name, |
| llvm::Constant * | C | ||
| ) |
Definition at line 214 of file CodeGenModule.cpp.
References Name.
Referenced by TryEmitDefinitionAsAlias().
| void CodeGenModule::addUsedGlobal | ( | llvm::GlobalValue * | GV | ) |
Add a global to a list to be added to the llvm.used metadata.
Definition at line 1215 of file CodeGenModule.cpp.
Referenced by clang::CodeGen::CoverageMappingModuleGen::emit(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and SetCommonAttributes().
| void CodeGenModule::AddVTableTypeMetadata | ( | llvm::GlobalVariable * | VTable, |
| CharUnits | Offset, | ||
| const CXXRecordDecl * | RD | ||
| ) |
Create and attach type metadata for the given vtable.
Definition at line 4473 of file CodeGenModule.cpp.
References CreateCrossDsoCfiTypeId(), CreateMetadataIdentifierForType(), getLLVMContext(), clang::CharUnits::getQuantity(), clang::TypeDecl::getTypeForDecl(), and NeedAllVtablesTypeId().
Referenced by EmitVTableTypeMetadata().
| void CodeGenModule::AppendLinkerOptions | ( | StringRef | Opts | ) |
Appends Opts to the "llvm.linker.options" metadata value.
Definition at line 1258 of file CodeGenModule.cpp.
References getLLVMContext().
Referenced by EmitTopLevelDecl().
| void CodeGenModule::clear | ( | ) |
Definition at line 360 of file CodeGenModule.cpp.
| void CodeGenModule::ClearUnusedCoverageMapping | ( | const Decl * | D | ) |
Remove the deferred empty coverage mapping as this declaration is actually instrumented.
Definition at line 4179 of file CodeGenModule.cpp.
References I.
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters().
| llvm::Function * CodeGenModule::codegenCXXStructor | ( | const CXXMethodDecl * | MD, |
| StructorType | Type | ||
| ) |
Definition at line 215 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::ForDefinition, clang::CodeGen::CodeGenFunction::GenerateCode(), getAddrOfCXXStructor(), getTypes(), setFunctionDefinitionAttributes(), setFunctionDLLStorageClass(), setFunctionLinkage(), SetLLVMFunctionAttributesForDefinition(), clang::CodeGen::toCXXCtorType(), and clang::CodeGen::toCXXDtorType().
Referenced by emitCXXConstructor(), and emitCXXDestructor().
| CharUnits CodeGenModule::computeNonVirtualBaseClassOffset | ( | const CXXRecordDecl * | DerivedClass, |
| CastExpr::path_const_iterator | Start, | ||
| CastExpr::path_const_iterator | End | ||
| ) |
Definition at line 147 of file CGClass.cpp.
References End, clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), getContext(), clang::CXXBaseSpecifier::getType(), I, clang::CXXBaseSpecifier::isVirtual(), and clang::CharUnits::Zero().
Referenced by clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), and GetNonVirtualBaseClassOffset().
| void CodeGenModule::ConstructAttributeList | ( | StringRef | Name, |
| const CGFunctionInfo & | Info, | ||
| CGCalleeInfo | CalleeInfo, | ||
| llvm::AttributeList & | Attrs, | ||
| unsigned & | CallingConv, | ||
| bool | AttrOnCallSite | ||
| ) |
Get the LLVM attributes and calling convention to use for a particular function type.
| Name | - The function name. |
| Info | - The function type information. |
| CalleeInfo | - The callee information these attributes are being constructed for. If valid, the attributes applied to this decl may contribute to the function attributes and calling convention. |
| Attrs | [out] - On return, the attribute list to use. |
| CallingConv | [out] - On return, the LLVM calling convention to use. |
Definition at line 1772 of file CGCall.cpp.
References AddAttributesFromFunctionProtoType(), clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_end(), clang::CodeGen::CGFunctionInfo::arg_size(), E, clang::FunctionProtoType::ExtParameterInfo::getABI(), clang::Type::getAs(), clang::Decl::getAttr(), clang::CodeGen::CGCalleeInfo::getCalleeDecl(), clang::CodeGen::CGCalleeInfo::getCalleeFunctionProtoType(), clang::CodeGen::CGFunctionInfo::getEffectiveCallingConvention(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), clang::CodeGen::ABIArgInfo::getInReg(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::ABIArgInfo::getPaddingInReg(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::Decl::hasAttr(), clang::Type::hasSignedIntegerRepresentation(), clang::Type::hasUnsignedIntegerRepresentation(), I, clang::CodeGen::CGFunctionInfo::isChainCall(), clang::Type::isConstantSizeType(), clang::Type::isIncompleteType(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::CXXMethodDecl::isVirtual(), clang::Type::isVoidType(), clang::CharUnits::isZero(), clang::Ordinary, clang::SwiftContext, clang::SwiftErrorResult, and clang::SwiftIndirectResult.
Referenced by clang::CodeGen::CodeGenFunction::EmitMustTailThunk(), and SetLLVMFunctionAttributes().
| llvm::Constant * CodeGenModule::CreateBuiltinFunction | ( | llvm::FunctionType * | FTy, |
| StringRef | Name, | ||
| llvm::AttributeList | ExtraAttrs = llvm::AttributeList() |
||
| ) |
Create a new compiler builtin function with the specified type and name.
CreateBuiltinFunction - Create a new builtin function with the specified type and name.
Definition at line 2278 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypeCache::getBuiltinCC().
| llvm::ConstantInt * CodeGenModule::CreateCrossDsoCfiTypeId | ( | llvm::Metadata * | MD | ) |
Generate a cross-DSO type identifier for MD.
Definition at line 874 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypeCache::Int64Ty.
Referenced by AddVTableTypeMetadata(), CreateFunctionTypeMetadata(), and clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck().
| void CodeGenModule::CreateFunctionTypeMetadata | ( | const FunctionDecl * | FD, |
| llvm::Function * | F | ||
| ) |
Create and attach type metadata to the given function.
Definition at line 1121 of file CodeGenModule.cpp.
References CreateCrossDsoCfiTypeId(), CreateMetadataIdentifierForType(), getContext(), clang::ASTContext::GetGVALinkageForFunction(), clang::ValueDecl::getType(), clang::GVA_AvailableExternally, clang::SanitizerSet::has(), and clang::LangOptions::Sanitize.
Referenced by SetLLVMFunctionAttributesForDefinition().
| llvm::Function * CodeGenModule::CreateGlobalInitOrDestructFunction | ( | llvm::FunctionType * | ty, |
| const Twine & | name, | ||
| const CGFunctionInfo & | FI, | ||
| SourceLocation | Loc = SourceLocation(), |
||
| bool | TLS = false |
||
| ) |
Definition at line 262 of file CGDeclCXX.cpp.
References clang::Create(), getLangOpts(), getModule(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), getTarget(), clang::InternalLinkage, isInSanitizerBlacklist(), and SetInternalFunctionAttributes().
Referenced by clang::CodeGen::CodeGenFunction::createAtExitStub(), createOffloadingBinaryDescriptorFunction(), and clang::CodeGen::CodeGenFunction::generateDestroyHelper().
| llvm::Metadata * CodeGenModule::CreateMetadataIdentifierForType | ( | QualType | T | ) |
Create a metadata identifier for the given type.
This may either be an MDString (for external identifiers) or a distinct unnamed MDNode (for internal identifiers).
Definition at line 4440 of file CodeGenModule.cpp.
References clang::QualType::getCanonicalType(), getCXXABI(), clang::Type::getLinkage(), getLLVMContext(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::isExternallyVisible(), and clang::MangleContext::mangleTypeName().
Referenced by AddVTableTypeMetadata(), CreateFunctionTypeMetadata(), clang::CodeGen::CodeGenFunction::EmitTypeMetadataCodeForVCall(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck(), and clang::CodeGen::CodeGenFunction::EmitVTableTypeCheckedLoad().
| llvm::Value * CodeGenModule::createOpenCLIntToSamplerConversion | ( | const Expr * | E, |
| CodeGenFunction & | CGF | ||
| ) |
Definition at line 4528 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CreateRuntimeFunction(), EmitConstantExpr(), getOpenCLRuntime(), clang::CodeGen::CGOpenCLRuntime::getSamplerType(), and clang::Expr::getType().
| llvm::GlobalVariable * CodeGenModule::CreateOrReplaceCXXRuntimeVariable | ( | StringRef | Name, |
| llvm::Type * | Ty, | ||
| llvm::GlobalValue::LinkageTypes | Linkage | ||
| ) |
Will return a global variable of the given type.
If a variable with a different type already exists then a new variable with the right type will be created and all uses of the old variable will be replaced with a bitcast to the new variable.
Definition at line 2477 of file CodeGenModule.cpp.
References getModule(), and supportsCOMDAT().
Referenced by clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), and clang::CodeGen::CodeGenVTables::GetAddrOfVTT().
| llvm::Constant * CodeGenModule::CreateRuntimeFunction | ( | llvm::FunctionType * | FTy, |
| StringRef | Name, | ||
| llvm::AttributeList | ExtraAttrs = llvm::AttributeList(), |
||
| bool | Local = false |
||
| ) |
Create a new runtime function with the specified type and name.
CreateRuntimeFunction - Create a new runtime function with the specified type and name.
Definition at line 2249 of file CodeGenModule.cpp.
References clang::ExternalLinkage, getCodeGenOpts(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), GetRuntimeFunctionDecl(), getTriple(), and clang::Decl::hasAttr().
Referenced by createARCRuntimeFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(), createOpenCLIntToSamplerConversion(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARCIntrinsicUse(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), emitAtomicLibcall(), clang::CodeGen::CodeGenFunction::EmitBuiltinAvailable(), emitCheckHandlerCall(), clang::CodeGen::CodeGenFunction::EmitFunctionInstrumentation(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), emitRTtypeidCall(), getAllocateExceptionFn(), getBadCastFn(), getBadTypeidFn(), getBeginCatchFn(), getCatchallRethrowFn(), getClangCallTerminateFn(), getEndCatchFn(), getFreeExceptionFn(), getGetExceptionPtrFn(), getGuardAbortFn(), getGuardAcquireFn(), getGuardReleaseFn(), getInitThreadAbortFn(), getInitThreadFooterFn(), getInitThreadHeaderFn(), getItaniumDynamicCastFn(), getPersonalityFn(), getTerminateFn(), getThrowFn(), getUnexpectedFn(), and clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit().
| llvm::Constant * CodeGenModule::CreateRuntimeVariable | ( | llvm::Type * | Ty, |
| StringRef | Name | ||
| ) |
Create a new runtime global variable with the specified type and name.
CreateRuntimeVariable - Create a new runtime global variable with the specified type and name.
Definition at line 2542 of file CodeGenModule.cpp.
Referenced by emitGlobalDtorWithCXAAtExit(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), and GetAddrOfConstantCFString().
| void CodeGenModule::DecorateInstructionWithInvariantGroup | ( | llvm::Instruction * | I, |
| const CXXRecordDecl * | RD | ||
| ) |
Adds !invariant.barrier !tag to instruction.
Definition at line 616 of file CodeGenModule.cpp.
References getLLVMContext().
Referenced by clang::CodeGen::CodeGenFunction::GetVTablePtr(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointer().
| void CodeGenModule::DecorateInstructionWithTBAA | ( | llvm::Instruction * | Inst, |
| llvm::MDNode * | TBAAInfo, | ||
| bool | ConvertTypeToTag = true |
||
| ) |
Decorate the instruction with a TBAA tag.
For scalar TBAA, the tag is the same as the type. For struct-path aware TBAA, the tag is different from the type: base type, access type and offset. When ConvertTypeToTag is true, we create a tag based on the scalar type.
For both scalar TBAA and struct-path aware TBAA, the tag has the same format: base type, access type and offset. When ConvertTypeToTag is true, we create a tag based on the scalar type.
Definition at line 606 of file CodeGenModule.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointer().
| llvm::Constant * CodeGenModule::EmitAnnotateAttr | ( | llvm::GlobalValue * | GV, |
| const AnnotateAttr * | AA, | ||
| SourceLocation | L | ||
| ) |
Generate the llvm::ConstantStruct which contains the annotation information for a given GlobalValue.
The annotation struct is {i8 *, i8 *, i8 *, i32}. The first field is a constant expression, the GlobalValue being annotated. The second field is the constant string created from the AnnotateAttr's annotation. The third field is a constant string containing the name of the translation unit. The fourth field is the line number in the file of the annotated value declaration.
Definition at line 1507 of file CodeGenModule.cpp.
References EmitAnnotationLineNo(), EmitAnnotationString(), EmitAnnotationUnit(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by AddGlobalAnnotations().
| llvm::Constant * CodeGenModule::EmitAnnotationLineNo | ( | SourceLocation | L | ) |
Emit the annotation line number.
Definition at line 1499 of file CodeGenModule.cpp.
References getContext(), clang::SourceManager::getExpansionLineNumber(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::PresumedLoc::isValid(), and SM.
Referenced by EmitAnnotateAttr(), and clang::CodeGen::CodeGenFunction::EmitAnnotationCall().
| llvm::Constant * CodeGenModule::EmitAnnotationString | ( | StringRef | Str | ) |
Emit an annotation string.
Definition at line 1475 of file CodeGenModule.cpp.
References AnnotationSection, getLLVMContext(), and getModule().
Referenced by EmitAnnotateAttr(), clang::CodeGen::CodeGenFunction::EmitAnnotationCall(), and EmitAnnotationUnit().
| llvm::Constant * CodeGenModule::EmitAnnotationUnit | ( | SourceLocation | Loc | ) |
Emit the annotation's translation unit.
Definition at line 1491 of file CodeGenModule.cpp.
References EmitAnnotationString(), clang::SourceManager::getBufferName(), getContext(), clang::PresumedLoc::getFilename(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), clang::PresumedLoc::isValid(), and SM.
Referenced by EmitAnnotateAttr(), and clang::CodeGen::CodeGenFunction::EmitAnnotationCall().
| llvm::Constant * CodeGenModule::EmitConstantExpr | ( | const Expr * | E, |
| QualType | DestType, | ||
| CodeGenFunction * | CGF = nullptr |
||
| ) |
Try to emit the given expression as a constant; returns 0 if the expression cannot be emitted as a constant.
Definition at line 1244 of file CGExprConstant.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantValue(), clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::Expr::getType(), getTypes(), clang::Expr::EvalStatus::HasSideEffects, clang::Type::isReferenceType(), clang::CodeGen::Type, and clang::Expr::EvalResult::Val.
Referenced by createOpenCLIntToSamplerConversion(), createReferenceTemporary(), EmitConstantValue(), EmitCXXNewAllocSize(), and clang::CodeGen::CodeGenFunction::EnterSEHTryStmt().
| llvm::Constant * CodeGenModule::EmitConstantInit | ( | const VarDecl & | D, |
| CodeGenFunction * | CGF = nullptr |
||
| ) |
Try to emit the initializer for the given declaration as a constant; returns 0 if the expression cannot be emitted as a constant.
Definition at line 1203 of file CGExprConstant.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantValueForMemory(), EmitNullConstant(), clang::VarDecl::evaluateValue(), clang::ASTContext::getBaseElementType(), clang::VarDecl::getInit(), clang::Expr::getType(), clang::ValueDecl::getType(), getTypes(), clang::VarDecl::hasLocalStorage(), clang::Type::isArrayType(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::FunctionDecl::isTrivial(), and clang::CodeGen::Type.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), and tryCaptureAsConstant().
| llvm::Constant * CodeGenModule::EmitConstantValue | ( | const APValue & | Value, |
| QualType | DestType, | ||
| CodeGenFunction * | CGF = nullptr |
||
| ) |
Emit the given constant value as a constant, in the type's scalar representation.
Definition at line 1273 of file CGExprConstant.cpp.
References clang::APValue::AddrLabelDiff, clang::APValue::Array, clang::APValue::ComplexFloat, clang::APValue::ComplexInt, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantExpr(), EmitConstantValueForMemory(), clang::CodeGen::CGCXXABI::EmitMemberPointer(), clang::APValue::Float, clang::APValue::getAddrLabelDiffLHS(), clang::APValue::getAddrLabelDiffRHS(), clang::APValue::getArrayFiller(), clang::APValue::getArrayInitializedElt(), clang::APValue::getArrayInitializedElts(), clang::APValue::getArraySize(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::APValue::getComplexFloatImag(), clang::APValue::getComplexFloatReal(), clang::APValue::getComplexIntImag(), clang::APValue::getComplexIntReal(), getCXXABI(), getDataLayout(), clang::ArrayType::getElementType(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::APValue::getKind(), clang::ASTContext::getLangOpts(), clang::APValue::getLValueBase(), clang::APValue::getLValueOffset(), getNullPointer(), clang::CharUnits::getQuantity(), clang::Expr::getType(), getTypes(), clang::ASTContext::getTypeSize(), clang::APValue::getVectorElt(), clang::APValue::getVectorLength(), clang::APValue::hasArrayFiller(), I, Inits, clang::APValue::Int, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::APValue::isFloat(), clang::APValue::isInt(), clang::APValue::isNullPointer(), clang::APValue::LValue, clang::APValue::MemberPointer, clang::APValue::Struct, clang::CodeGen::Type, clang::APValue::Uninitialized, clang::APValue::Union, and clang::APValue::Vector.
Referenced by EmitConstantExpr(), EmitConstantValueForMemory(), and GetAddrOfGlobalTemporary().
| llvm::Constant * CodeGenModule::EmitConstantValueForMemory | ( | const APValue & | Value, |
| QualType | DestType, | ||
| CodeGenFunction * | CGF = nullptr |
||
| ) |
Emit the given constant value as a constant, in the type's memory representation.
Definition at line 1484 of file CGExprConstant.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantValue(), getTypes(), and clang::CodeGen::Type.
Referenced by EmitConstantInit(), and EmitConstantValue().
| void CodeGenModule::EmitDeferredUnusedCoverageMappings | ( | ) |
Emit all the deferred coverage mappings for the uninstrumented functions.
Definition at line 4194 of file CodeGenModule.cpp.
References clang::Ctor_Base, clang::Dtor_Base, clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), getFunctionLinkage(), clang::Decl::getKind(), clang::Decl::getLocStart(), getMangledName(), and I.
Referenced by Release().
| void CodeGenModule::EmitExplicitCastExprType | ( | const ExplicitCastExpr * | E, |
| CodeGenFunction * | CGF = nullptr |
||
| ) |
Emit type info if type of an expression is a variably modified type.
Also emit proper debug info for cast types.
Definition at line 880 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::Expr::getType(), and clang::Type::isVariablyModifiedType().
Referenced by clang::CodeGen::CodeGenFunction::EmitDynamicCast().
| void CodeGenModule::EmitGlobal | ( | GlobalDecl | D | ) |
Emit code for a singal global function or var decl.
Forward declarations are emitted lazily.
Definition at line 1695 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::frontend::CPlusPlus, clang::VarDecl::Definition, EmitOMPDeclareReduction(), GetAddrOfGlobalVar(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), GetGlobalValue(), clang::ASTContext::getInlineVariableDefinitionKind(), getLangOpts(), getMangledName(), getTypes(), clang::Decl::hasAttr(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), clang::ASTContext::Strong, and clang::CodeGen::Type.
Referenced by EmitTopLevelDecl().
| void CodeGenModule::EmitGlobalAnnotations | ( | ) |
Emit all the global annotations.
Definition at line 1462 of file CodeGenModule.cpp.
References AnnotationSection, and getModule().
Referenced by Release().
| llvm::Constant * CodeGenModule::EmitNullConstant | ( | QualType | T | ) |
Return the result of value-initializing the given type, i.e.
a null expression of the given type. This is usually, but not always, an LLVM null constant.
Definition at line 1632 of file CGExprConstant.cpp.
References clang::Type::castAs(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitNullConstant(), clang::CodeGen::CGCXXABI::EmitNullMemberPointer(), clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), getCXXABI(), clang::RecordType::getDecl(), clang::ArrayType::getElementType(), getNullPointer(), clang::ConstantArrayType::getSize(), getTypes(), and clang::Type::isMemberDataPointerType().
Referenced by EmitConstantInit(), emitInitWithReductionInitializer(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), EmitNullConstant(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), and getOrCreateStaticVarDecl().
| llvm::Constant * CodeGenModule::EmitNullConstantForBase | ( | const CXXRecordDecl * | Record | ) |
Return a null constant appropriate for zero-initializing a base class with the given type.
This is usually, but not always, an LLVM null constant.
Definition at line 1662 of file CGExprConstant.cpp.
References EmitNullConstant().
Referenced by EmitNullBaseClassInitialization().
| void CodeGenModule::EmitOMPDeclareReduction | ( | const OMPDeclareReductionDecl * | D, |
| CodeGenFunction * | CGF = nullptr |
||
| ) |
Emit a code for declare reduction construct.
Definition at line 1933 of file CGDecl.cpp.
References getOpenMPRuntime(), and clang::Decl::isUsed().
Referenced by clang::CodeGen::CodeGenFunction::EmitDecl(), EmitGlobal(), and EmitTopLevelDecl().
| void CodeGenModule::EmitOMPThreadPrivateDecl | ( | const OMPThreadPrivateDecl * | D | ) |
Emit a code for threadprivate directive.
| D | Threadprivate declaration. |
Definition at line 4425 of file CodeGenModule.cpp.
References clang::CodeGen::emitThreadPrivateVarDefinition(), GetAddrOfGlobalVar(), getContext(), getDeclAlign(), getOpenMPRuntime(), and clang::OMPThreadPrivateDecl::varlists().
Referenced by EmitTopLevelDecl().
| void CodeGenModule::EmitTentativeDefinition | ( | const VarDecl * | D | ) |
Definition at line 2547 of file CodeGenModule.cpp.
References GetGlobalValue(), clang::VarDecl::getInit(), and getMangledName().
| void CodeGenModule::EmitTopLevelDecl | ( | Decl * | D | ) |
Emit code for a single top level declaration.
EmitTopLevelDecl - Emit code for a single top level declaration.
Definition at line 3901 of file CodeGenModule.cpp.
References AddDeferredUnusedCoverageMapping(), AddDependentLib(), AddDetectMismatch(), AppendLinkerOptions(), clang::ExternalASTSource::EK_Never, clang::CodeGen::CGCXXABI::EmitCXXConstructors(), clang::CodeGen::CGCXXABI::EmitCXXDestructors(), EmitGlobal(), EmitOMPDeclareReduction(), EmitOMPThreadPrivateDecl(), clang::CodeGen::CodeGenFunction::GenerateObjCMethod(), clang::Decl::getASTContext(), getCodeGenOpts(), getContext(), getCXXABI(), clang::Decl::getDeclContext(), clang::ASTContext::getExternalSource(), clang::Decl::getKind(), getModule(), getModuleDebugInfo(), clang::ASTContext::getModuleInitializers(), I, clang::DeclContext::isDependentContext(), clang::codegenoptions::LimitedDebugInfo, clang::PCK_Compiler, clang::PCK_ExeStr, clang::PCK_Lib, clang::PCK_Linker, clang::PCK_Unknown, clang::PCK_User, Stack, clang::Module::submodule_begin(), clang::Module::submodule_end(), and clang::TSK_ExplicitInstantiationDefinition.
Referenced by HandleCXXStaticMemberVarInstantiation().
| void CodeGenModule::EmitVTable | ( | CXXRecordDecl * | theClass | ) |
This is a callback from Sema to tell us that that a particular vtable is required to be emitted in this translation unit.
This is only called for vtables that must be emitted (mainly due to key functions). For weak vtables, CodeGen tracks when they are needed and emits them as-needed.
Definition at line 822 of file CGVTables.cpp.
References clang::CodeGen::CodeGenVTables::GenerateClassData().
| void CodeGenModule::EmitVTableTypeMetadata | ( | llvm::GlobalVariable * | VTable, |
| const VTableLayout & | VTLayout | ||
| ) |
Emit type metadata for the given vtable using the given layout.
Definition at line 946 of file CGVTables.cpp.
References AddVTableTypeMetadata(), clang::VTableLayout::getAddressPoints(), getCodeGenOpts(), getCXXABI(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::TargetInfo::getPointerWidth(), clang::ASTContext::getTargetInfo(), clang::VTableLayout::getVTableOffset(), clang::MangleContext::mangleTypeName(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenVTables::GenerateConstructionVTable().
| void CodeGenModule::Error | ( | SourceLocation | loc, |
| StringRef | error | ||
| ) |
Emit a general error that something can't be done.
Definition at line 622 of file CodeGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), getDiags(), clang::ASTContext::getFullLoc(), and clang::DiagnosticsEngine::Report().
Referenced by createCoroData(), clang::CodeGen::CodeGenFunction::EmitCoroutineIntrinsic(), and clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit().
| void CodeGenModule::ErrorUnsupported | ( | const Stmt * | S, |
| const char * | Type | ||
| ) |
Print out an error that codegen doesn't support the specified stmt yet.
ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet.
Definition at line 629 of file CodeGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), getDiags(), clang::ASTContext::getFullLoc(), clang::Stmt::getLocStart(), clang::Stmt::getSourceRange(), clang::DiagnosticsEngine::Report(), and clang::CodeGen::Type.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), AddVariableConstraints(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCapturedLocals(), clang::CodeGen::CodeGenFunction::EmitLambdaStaticInvokeFunction(), clang::CodeGen::CodeGenFunction::EmitLambdaToBlockPointerBody(), clang::CodeGen::CodeGenFunction::EmitNVPTXDevicePrintfCallExpr(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::ErrorUnsupported(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), and clang::CodeGen::CodeGenFunction::generateObjCSetterBody().
| void CodeGenModule::ErrorUnsupported | ( | const Decl * | D, |
| const char * | Type | ||
| ) |
Print out an error that codegen doesn't support the specified decl yet.
ErrorUnsupported - Print out an error that codegen doesn't support the specified decl yet.
Definition at line 639 of file CodeGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), getDiags(), clang::ASTContext::getFullLoc(), clang::Decl::getLocation(), clang::DiagnosticsEngine::Report(), and clang::CodeGen::Type.
| ConstantAddress CodeGenModule::GetAddrOfConstantCFString | ( | const StringLiteral * | Literal | ) |
Return a pointer to a constant CFString object for the given string.
Definition at line 3374 of file CodeGenModule.cpp.
References Builder, clang::TranslationUnitDecl::castToDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), CreateRuntimeVariable(), clang::ExternalLinkage, clang::CharUnits::fromQuantity(), clang::IdentifierTable::get(), clang::ASTContext::getCFConstantStringType(), GetConstantCFStringEntry(), getContext(), getDataLayout(), getModule(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), clang::ASTContext::getTranslationUnitDecl(), getTriple(), clang::ASTContext::getTypeAlignInChars(), getTypes(), clang::ASTContext::Idents, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::DeclContext::lookup(), Result, and clang::CodeGen::Type.
| ConstantAddress CodeGenModule::GetAddrOfConstantCompoundLiteral | ( | const CompoundLiteralExpr * | E | ) |
Returns a pointer to a constant global variable for the given file-scope compound literal expression.
Definition at line 1508 of file CGExprConstant.cpp.
References clang::CompoundLiteralExpr::isFileScope().
| llvm::GlobalVariable * CodeGenModule::getAddrOfConstantCompoundLiteralIfEmitted | ( | const CompoundLiteralExpr * | E | ) |
If it's been emitted already, returns the GlobalVariable corresponding to a compound literal.
Otherwise, returns null.
Definition at line 1495 of file CGExprConstant.cpp.
| ConstantAddress CodeGenModule::GetAddrOfConstantCString | ( | const std::string & | Str, |
| const char * | GlobalName = nullptr |
||
| ) |
Returns a pointer to a character array containing the literal and a terminating '\0' character.
GetAddrOfConstantCString - Returns a pointer to a character array containing the literal and a terminating '\0' character.
The result has pointer to array type.
| GlobalName | If provided, the name to use for the global (if one is created). |
The result has pointer to array type.
Definition at line 3657 of file CodeGenModule.cpp.
References GenerateStringLiteral(), clang::ASTContext::getAlignOfGlobalVarInChars(), getContext(), and getLLVMContext().
Referenced by buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), and GetAddrOfConstantStringFromObjCEncode().
| ConstantAddress clang::CodeGen::CodeGenModule::GetAddrOfConstantString | ( | const StringLiteral * | Literal | ) |
Return a pointer to a constant NSString object for the given string.
Or a user defined String object as defined via -fconstant-string-class=class_name option.
| ConstantAddress CodeGenModule::GetAddrOfConstantStringFromLiteral | ( | const StringLiteral * | S, |
| StringRef | Name = ".str" |
||
| ) |
Return a pointer to a constant array for the given string literal.
GetAddrOfConstantStringFromLiteral - Return a pointer to a constant array for the given string literal.
Definition at line 3600 of file CodeGenModule.cpp.
References GenerateStringLiteral(), clang::ASTContext::getAlignOfGlobalVarInChars(), GetConstantArrayFromStringLiteral(), getContext(), getCXXABI(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CharUnits::getQuantity(), clang::StringLiteral::getStrTokenLoc(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::MangleContext::mangleStringLiteral(), Name, clang::LangOptions::Sanitize, and clang::MangleContext::shouldMangleStringLiteral().
| ConstantAddress CodeGenModule::GetAddrOfConstantStringFromObjCEncode | ( | const ObjCEncodeExpr * | E | ) |
Return a pointer to a constant array for the given ObjCEncodeExpr node.
GetAddrOfConstantStringFromObjCEncode - Return a pointer to a constant array for the given ObjCEncodeExpr node.
Definition at line 3647 of file CodeGenModule.cpp.
References GetAddrOfConstantCString(), getContext(), clang::ObjCEncodeExpr::getEncodedType(), and clang::ASTContext::getObjCEncodingForType().
| llvm::Constant * CodeGenModule::getAddrOfCXXStructor | ( | const CXXMethodDecl * | MD, |
| StructorType | Type, | ||
| const CGFunctionInfo * | FnInfo = nullptr, |
||
| llvm::FunctionType * | FnType = nullptr, |
||
| bool | DontDefer = false, |
||
| ForDefinition_t | IsForDefinition = NotForDefinition |
||
| ) |
Return the address of the constructor/destructor of the given type.
Definition at line 240 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getMangledName(), getTypes(), clang::CodeGen::toCXXCtorType(), and clang::CodeGen::toCXXDtorType().
Referenced by codegenCXXStructor(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), EmitDeclDestroy(), GetAddrOfGlobal(), and pushTemporaryCleanup().
| llvm::Constant * CodeGenModule::GetAddrOfFunction | ( | GlobalDecl | GD, |
| llvm::Type * | Ty = nullptr, |
||
| bool | ForVTable = false, |
||
| bool | DontDefer = false, |
||
| ForDefinition_t | IsForDefinition = NotForDefinition |
||
| ) |
Return the address of the given function.
GetAddrOfFunction - Return the address of the given function.
If Ty is non-null, then this function will use the specified type if it has to create it.
If Ty is non-null, then this function will use the specified type if it has to create it (this occurs when we see a definition of the function).
Definition at line 2190 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertFunctionType(), clang::ASTContext::getCanonicalType(), clang::GlobalDecl::getDecl(), getMangledName(), clang::ValueDecl::getType(), and getTypes().
Referenced by clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), EmitFunctionDeclPointer(), EmitNewDeleteCall(), clang::CodeGen::CodeGenFunction::generateThunk(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), and GetAddrOfGlobal().
| llvm::Constant * CodeGenModule::GetAddrOfGlobal | ( | GlobalDecl | GD, |
| ForDefinition_t | IsForDefinition = NotForDefinition |
||
| ) |
Definition at line 2447 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), getAddrOfCXXStructor(), GetAddrOfFunction(), GetAddrOfGlobalVar(), clang::GlobalDecl::getCtorType(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::getFromCtorType(), clang::CodeGen::getFromDtorType(), clang::CodeGen::CodeGenTypes::GetFunctionType(), and getTypes().
Referenced by emitConstructorDestructorAlias(), clang::CodeGen::CodeGenFunction::EmitOMPCopyinClause(), getOrCreateStaticVarDecl(), and TryEmitDefinitionAsAlias().
| llvm::Constant * CodeGenModule::GetAddrOfGlobalBlock | ( | const BlockExpr * | BE, |
| StringRef | Name | ||
| ) |
Gets the address of a block which requires no captures.
Definition at line 1104 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::BlockExpression, buildGlobalBlock(), computeBlockInfo(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), getAddrOfGlobalBlockIfEmitted(), clang::BlockExpr::getBlockDecl(), Name, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
|
inline |
Returns the address of a block which requires no caputres, or null if we've yet to emit the block for BE.
Definition at line 797 of file CodeGenModule.h.
Referenced by buildGlobalBlock(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), and GetAddrOfGlobalBlock().
| ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary | ( | const MaterializeTemporaryExpr * | E, |
| const Expr * | Inner | ||
| ) |
Returns a pointer to a global variable representing a temporary with static or thread storage duration.
Definition at line 3688 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::LangAS::Default, E, EmitConstantValue(), clang::Expr::EvaluateAsRValue(), clang::ExternalLinkage, getContext(), getCXXABI(), clang::MaterializeTemporaryExpr::getExtendingDecl(), GetGlobalVarAddressSpace(), clang::Decl::getLexicalDeclContext(), getLLVMLinkageVarDefinition(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::ASTContext::getMaterializedTemporaryValue(), getModule(), clang::CharUnits::getQuantity(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::ASTContext::getTargetAddressSpace(), getTargetCodeGenInfo(), clang::MaterializeTemporaryExpr::GetTemporaryExpr(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), getTypes(), clang::Expr::EvalStatus::hasSideEffects(), clang::if(), clang::InternalLinkage, isTypeConstant(), clang::APValue::isUninit(), clang::MangleContext::mangleReferenceTemporary(), Name, clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), clang::SD_Static, clang::SD_Thread, setGlobalVisibility(), setTLSMode(), supportsCOMDAT(), clang::CodeGen::Type, and clang::Expr::EvalResult::Val.
Referenced by createReferenceTemporary().
| llvm::Constant * CodeGenModule::GetAddrOfGlobalVar | ( | const VarDecl * | D, |
| llvm::Type * | Ty = nullptr, |
||
| ForDefinition_t | IsForDefinition = NotForDefinition |
||
| ) |
Return the llvm::Constant for the address of the given global variable.
GetAddrOfGlobalVar - Return the llvm::Constant for the address of the given global variable.
If Ty is non-null and if the global doesn't exist, then it will be created with the specified type instead of whatever the normal requested type would be. If IsForDefinition is true, it is guranteed that an actual global with type Ty will be returned, not conversion of a variable with the same mangled name but some other type.
Definition at line 2524 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), getContext(), getMangledName(), clang::ValueDecl::getType(), getTypes(), and clang::VarDecl::hasGlobalStorage().
Referenced by EmitGlobal(), EmitGlobalVarDeclLValue(), EmitOMPThreadPrivateDecl(), GetAddrOfGlobal(), and HandleCXXStaticMemberVarInstantiation().
Get the address of the RTTI descriptor for the given type.
Definition at line 4410 of file CodeGenModule.cpp.
References clang::CodeGen::CGCXXABI::getAddrOfRTTIDescriptor(), getCXXABI(), getLangOpts(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::ObjCRuntime::isGNUFamily(), clang::Type::isObjCObjectPointerType(), and clang::LangOptions::ObjCRuntime.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), and clang::CodeGen::CodeGenFunction::StartFunction().
| llvm::Constant * CodeGenModule::GetAddrOfThunk | ( | GlobalDecl | GD, |
| const ThunkInfo & | Thunk | ||
| ) |
Get the address of the thunk for the given global decl.
Definition at line 33 of file CGVTables.cpp.
References getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(), clang::CodeGen::CGCXXABI::getMangleContext(), getTypes(), clang::MangleContext::mangleCXXDtorThunk(), clang::MangleContext::mangleThunk(), Name, clang::ThunkInfo::This, and clang::CodeGen::Type.
| ConstantAddress CodeGenModule::GetAddrOfUuidDescriptor | ( | const CXXUuidofExpr * | E | ) |
Get the address of a uuid descriptor .
Definition at line 1637 of file CodeGenModule.cpp.
References clang::CharUnits::fromQuantity(), getModule(), clang::CXXUuidofExpr::getUuidStr(), Name, clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, and supportsCOMDAT().
|
inline |
Definition at line 590 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction().
|
inline |
Definition at line 582 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction().
| llvm::Type * CodeGenModule::getBlockDescriptorType | ( | ) |
Fetches the type of a generic block descriptor.
Definition at line 943 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenTypes::ConvertType(), clang::serialized_diags::create(), getContext(), getLangOpts(), clang::ASTContext::getTargetAddressSpace(), getTypes(), clang::frontend::OpenCL, clang::LangAS::opencl_constant, and clang::CodeGen::Type.
Referenced by buildBlockDescriptor(), getGenericBlockLiteralType(), and initializeForBlockHeader().
| StringRef CodeGenModule::getBlockMangledName | ( | GlobalDecl | GD, |
| const BlockDecl * | BD | ||
| ) |
Definition at line 751 of file CodeGenModule.cpp.
References Buffer, clang::GlobalDecl::getCtorType(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::MangleContext::mangleBlock(), clang::MangleContext::mangleCtorBlock(), clang::MangleContext::mangleDtorBlock(), clang::MangleContext::mangleGlobalBlock(), and Result.
Referenced by clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), and getStaticDeclName().
| llvm::Constant * CodeGenModule::getBlockObjectAssign | ( | ) |
Definition at line 2468 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Type, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction().
| llvm::Constant * CodeGenModule::getBlockObjectDispose | ( | ) |
Definition at line 2456 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Type, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by clang::CodeGen::CodeGenFunction::BuildBlockRelease().
| llvm::Constant * CodeGenModule::getBuiltinLibFunction | ( | const FunctionDecl * | FD, |
| unsigned | BuiltinID | ||
| ) |
Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf".
getBuiltinLibFunction - Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf".
Definition at line 45 of file CGBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, Context, clang::Builtin::Context::getName(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Builtin::Context::isLibFunction(), and Name.
| CharUnits CodeGenModule::getClassPointerAlignment | ( | const CXXRecordDecl * | RD | ) |
Returns the assumed alignment of an opaque pointer to the given class.
Return the best known alignment for an unknown pointer to a particular class.
Definition at line 36 of file CGClass.cpp.
References clang::ASTRecordLayout::getAlignment(), clang::ASTContext::getASTRecordLayout(), getContext(), clang::Decl::hasAttr(), clang::TagDecl::isCompleteDefinition(), and clang::CharUnits::One().
Referenced by clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), InitCatchParam(), clang::CodeGen::CodeGenFunction::LoadCXXThisAddress(), and PerformReturnAdjustment().
|
inline |
Definition at line 619 of file CodeGenModule.h.
Referenced by clang::CodeGen::CoverageMappingModuleGen::addFunctionMappingRecord(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::CodeGen::CGDebugInfo::CGDebugInfo(), clang::CodeGen::CodeGenFunction::CodeGenFunction(), createReferenceTemporary(), CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitARCDestroyStrong(), clang::CodeGen::CodeGenFunction::EmitARCInitWeak(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitBlockWithFallThrough(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitCaseStmt(), clang::CodeGen::CodeGenPGO::emitCounterIncrement(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), EmitDeclDestroy(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitDeclRefExprDbgValue(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), clang::CodeGen::CGDebugInfo::EmitExplicitCastType(), clang::CodeGen::CGDebugInfo::EmitImportDecl(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitSanitizerStatReport(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), EmitTopLevelDecl(), clang::CodeGen::CodeGenFunction::EmitTypeMetadataCodeForVCall(), clang::CodeGen::CGDebugInfo::EmitUsingDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck(), EmitVTableTypeMetadata(), emitWritebackArg(), enterBlockScope(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), GenOpenCLArgMetadata(), clang::CodeGen::CodeGenFunction::getARCCleanupKind(), clang::CodeGen::CodeGenTypes::getCodeGenOpts(), getCodegenToUse(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), HasHiddenLTOVisibility(), clang::CodeGen::CodeGenFunction::incrementProfileCounter(), clang::CodeGen::CodeGenFunction::InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::LValueIsSuitableForInlineAtomic(), clang::CodeGen::CodeGenFunction::needsEHCleanup(), Release(), clang::CodeGen::CodeGenFunction::setBlockContextParameter(), shouldEmitAvailableExternallyVTable(), clang::CodeGen::CodeGenFunction::ShouldEmitVTableTypeCheckedLoad(), clang::CodeGen::CodeGenFunction::ShouldInstrumentFunction(), clang::CodeGen::CodeGenFunction::shouldUseFusedARCCalls(), clang::CodeGen::CodeGenFunction::ShouldXRayInstrumentFunction(), clang::CodeGen::CodeGenFunction::StartFunction(), TryEmitBaseDestructorAsAlias(), TryEmitDefinitionAsAlias(), and clang::CodeGen::CodeGenPGO::valueProfile().
| llvm::Constant * CodeGenModule::GetConstantArrayFromStringLiteral | ( | const StringLiteral * | E | ) |
Return a constant array for the given string.
Definition at line 3534 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertType(), clang::ASTContext::getAsConstantArrayType(), clang::StringLiteral::getCharByteWidth(), clang::StringLiteral::getCodeUnit(), clang::StringLiteral::getLength(), clang::StringLiteral::getString(), clang::Expr::getType(), getTypes(), clang::Type::isPointerType(), and clang::CodeGen::Type.
Referenced by GetAddrOfConstantStringFromLiteral().
|
inline |
Definition at line 613 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), buildBlockDescriptor(), buildByrefHelpers(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), buildGlobalBlock(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), classifyType(), clang::CodeGen::CGDebugInfo::completeClass(), clang::CodeGen::CGDebugInfo::completeRequiredType(), clang::CodeGen::CGDebugInfo::completeType(), clang::CodeGen::CGDebugInfo::completeUnusedClass(), clang::CodeGen::CGObjCRuntime::ComputeBitfieldBitOffset(), computeBlockInfo(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), computeNonVirtualBaseClassOffset(), configureBlocksRuntimeObject(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenFunction::createAtExitStub(), CreateFunctionTypeMetadata(), clang::CodeGen::CreateItaniumCXXABI(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), clang::CodeGen::CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(), createOffloadingBinaryDescriptorFunction(), createPrivatesRecordDecl(), createRuntimeShuffleFunction(), EmitAnnotationLineNo(), EmitAnnotationUnit(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitCopyToScratchpad(), clang::CodeGen::CodeGenFunction::EmitCoroutineBody(), clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::emitDeclareSimdFunction(), emitDestructorsFunction(), clang::CodeGen::emitDoacrossInit(), clang::CodeGen::emitDoacrossOrdered(), clang::CodeGen::CodeGenFunction::EmitDoStmt(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::CodeGen::CodeGenFunction::EmitForStmt(), EmitFunctionDeclPointer(), EmitGlobalNamedRegister(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), emitInterWarpCopyFunction(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), EmitNullConstant(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitOMPAtomicRMW(), EmitOMPThreadPrivateDecl(), emitOutlinedFunctionPrologue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitReduction(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::emitTaskReductionFixups(), EmitTopLevelDecl(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenVTables::EmitVTTDefinition(), clang::CodeGen::CodeGenFunction::EmitWhileStmt(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), extractFieldType(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), GenerateStringLiteral(), GetAddrOfConstantCFString(), GetAddrOfConstantCString(), GetAddrOfConstantStringFromLiteral(), GetAddrOfConstantStringFromObjCEncode(), GetAddrOfGlobalTemporary(), GetAddrOfGlobalVar(), clang::CodeGen::CodeGenVTables::GetAddrOfVTT(), getAsmSrcLocInfo(), getBlockDescriptorType(), getClassPointerAlignment(), clang::CodeGen::CGCXXABI::getContext(), clang::CodeGen::CodeGenFunction::getContext(), getDynamicOffsetAlignment(), getFunctionLinkage(), getGuardAcquireFn(), getLLVMLinkageVarDefinition(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getMemberPointerConstant(), GetNonVirtualBaseClassOffset(), getOrCreateStaticVarDecl(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CodeGen::CGOpenCLRuntime::getPipeType(), clang::CodeGen::CGOpenCLRuntime::getSamplerType(), clang::CodeGen::CodeGenVTables::getSecondaryVirtualPointerIndex(), clang::CodeGen::CodeGenVTables::getSubVTTIndex(), getVBaseAlignment(), GetWeakRefReference(), imbueXRayAttrs(), InitCatchParam(), isInSanitizerBlacklist(), clang::CodeGen::swiftcall::isLegalIntegerType(), clang::CodeGen::CodeGenVTables::isVTableExternal(), clang::CodeGen::scanForTargetRegionsFunctions(), clang::CodeGen::CGDebugInfo::setLocation(), shouldBeInCOMDAT(), ShouldUseExternalRTTIDescriptor(), and clang::CodeGen::CodeGenFunction::StartThunk().
|
inline |
Definition at line 555 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping().
|
inline |
Return a reference to the configured CUDA runtime.
Definition at line 538 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCUDAKernelCallExpr(), and clang::CodeGen::CodeGenFunction::GenerateCode().
|
inline |
Definition at line 630 of file CodeGenModule.h.
Referenced by BuildAppleKextVirtualCall(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), CalculateCookiePadding(), clang::CodeGen::CodeGenFunction::CodeGenFunction(), CodeGenModule(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::createAtExitStub(), CreateMetadataIdentifierForType(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), clang::CodeGen::CodeGenFunction::EmitCXXMemberDataPointerAddress(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), EmitDeclDestroy(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitDynamicCastToNull(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitInlinedInheritingCXXConstructorCall(), EmitMemberInitializer(), EmitNullBaseClassInitialization(), EmitNullConstant(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), EmitTopLevelDecl(), EmitTypeidFromVTable(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoad(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoads(), EmitVTableTypeMetadata(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::ExitCXXTryStmt(), clang::CodeGen::CodeGenVTables::GenerateClassData(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), GetAddrOfConstantStringFromLiteral(), GetAddrOfGlobalTemporary(), GetAddrOfRTTIDescriptor(), GetAddrOfThunk(), clang::CodeGen::CodeGenVTables::GetAddrOfVTT(), GetAddrOfVTTVTable(), getBlockMangledName(), getFunctionLinkage(), getMangledName(), getMemberPointerConstant(), getTerminateFn(), clang::CodeGen::CodeGenFunction::getTerminateHandler(), clang::CodeGen::CodeGenFunction::getTerminateLandingPad(), getUniqueTagTypeName(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CodeGen::CodeGenFunction::InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::InitializeVTablePointers(), PerformReturnAdjustment(), pushTemporaryCleanup(), setFunctionDLLStorageClass(), SetLLVMFunctionAttributesForDefinition(), setThunkProperties(), shouldEmitAvailableExternallyVTable(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and clang::CodeGen::CodeGenFunction::StartThunk().
|
inline |
Definition at line 622 of file CodeGenModule.h.
Referenced by clang::CodeGen::ConstantAggregateBuilderBase::addPlaceholderWithSize(), BuildAggStore(), CoerceIntOrPtrToIntOrPtr(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CodeGenFunction::CreateDefaultAlignTempAlloca(), clang::CodeGen::CodeGenFunction::CreateTempAlloca(), CreateTempAllocaForCoercion(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(), EmitConstantValue(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNVPTXDevicePrintfCallExpr(), emitPointerArithmetic(), emitVoidPtrDirectVAArg(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), GetAddrOfConstantCFString(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), clang::CodeGen::swiftcall::SwiftAggLowering::getCoerceAndExpandTypes(), clang::CodeGen::swiftcall::getNaturalAlignment(), GetTargetTypeStoreSize(), getTypeAllocSize(), getTypeStoreSize(), isFullSizeType(), and clang::CodeGen::DominatingLLVMValue::save().
|
inline |
Definition at line 621 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures(), CodeGenModule(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), Error(), ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), getFunctionFeatureMap(), and Release().
| CharUnits CodeGenModule::getDynamicOffsetAlignment | ( | CharUnits | ActualAlign, |
| const CXXRecordDecl * | Class, | ||
| CharUnits | ExpectedTargetAlign | ||
| ) |
Given a class pointer with an actual known alignment, and the expected alignment of an object at a dynamic offset w.r.t that pointer, return the alignment to assume at the offset.
Definition at line 70 of file CGClass.cpp.
References clang::ASTContext::getASTRecordLayout(), getContext(), clang::TagDecl::isCompleteDefinition(), and min().
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXMemberDataPointerAddress(), and getVBaseAlignment().
| void CodeGenModule::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
| const FunctionDecl * | FD | ||
| ) |
Definition at line 4493 of file CodeGenModule.cpp.
References clang::TargetOptions::CPU, clang::TargetOptions::Features, clang::TargetOptions::FeaturesAsWritten, clang::Decl::getAttr(), getDiags(), clang::TargetInfo::getTargetOpts(), and clang::TargetInfo::initFeatureMap().
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures(), and hasRequiredFeatures().
| llvm::GlobalValue::LinkageTypes CodeGenModule::getFunctionLinkage | ( | GlobalDecl | GD | ) |
Definition at line 829 of file CodeGenModule.cpp.
References getContext(), getCXXABI(), clang::TargetInfo::getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::ASTContext::GetGVALinkageForFunction(), getLLVMLinkageForDeclarator(), clang::ASTContext::getTargetInfo(), clang::GVA_Internal, clang::InternalLinkage, and clang::TargetCXXABI::isMicrosoft().
Referenced by emitConstructorDestructorAlias(), EmitDeferredUnusedCoverageMappings(), getCodegenToUse(), setFunctionLinkage(), and TryEmitDefinitionAsAlias().
| llvm::Type * CodeGenModule::getGenericBlockLiteralType | ( | ) |
The type of a generic block literal.
Definition at line 975 of file CGBlocks.cpp.
References clang::serialized_diags::create(), getBlockDescriptorType(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Type, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitBlockCallExpr().
|
inline |
Definition at line 649 of file CodeGenModule.h.
|
inline |
Definition at line 650 of file CodeGenModule.h.
| llvm::GlobalValue * CodeGenModule::GetGlobalValue | ( | StringRef | Ref | ) |
Definition at line 772 of file CodeGenModule.cpp.
References getModule().
Referenced by emitConstructorDestructorAlias(), EmitGlobal(), EmitTentativeDefinition(), GetWeakRefReference(), and TryEmitDefinitionAsAlias().
Return the AST address space of the underlying global variable for D, as determined by its declaration.
Normally this is the same as the address space of D's type, but in CUDA, address spaces are associated with declarations, not types. If D is nullptr, return the default address space for global variable.
For languages without explicit address spaces, if D has default address space, target-specific global or constant address space may be returned.
Definition at line 2575 of file CodeGenModule.cpp.
References clang::LangAS::cuda_constant, clang::LangAS::cuda_device, clang::LangAS::cuda_shared, clang::LangAS::FirstTargetAddressSpace, clang::QualType::getAddressSpace(), clang::CodeGen::TargetCodeGenInfo::getGlobalVarAddressSpace(), getTargetCodeGenInfo(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::LangAS::opencl_constant, clang::LangAS::opencl_global, and clang::LangAS::opencl_local.
Referenced by GetAddrOfGlobalTemporary(), and getOrCreateStaticVarDecl().
|
inline |
Definition at line 615 of file CodeGenModule.h.
| llvm::Function * CodeGenModule::getIntrinsic | ( | unsigned | IID, |
| ArrayRef< llvm::Type * > | Tys = None |
||
| ) |
Definition at line 3333 of file CodeGenModule.cpp.
References getModule(), and ID.
Referenced by clang::CodeGen::CallArgList::allocateArgumentMemory(), buildFMulAdd(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), EmitAArch64TblBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), emitBinaryBuiltin(), clang::CodeGen::CodeGenFunction::EmitCapturedLocals(), emitCatchDispatchBlock(), clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(), clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCoroutineBody(), clang::CodeGen::CodeGenFunction::EmitCoroutineIntrinsic(), clang::CodeGen::CodeGenPGO::emitCounterIncrement(), EmitCXXNewAllocSize(), EmitDeclInvariant(), EmitFAbs(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), emitFPIntBuiltin(), clang::CodeGen::CodeGenFunction::EmitFunctionInstrumentation(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), EmitOverflowIntrinsic(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), emitRangedBuiltin(), EmitSpecialRegisterBuiltin(), emitSuspendExpression(), clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), emitTernaryBuiltin(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenFunction::EmitTypeMetadataCodeForVCall(), emitUnaryBuiltin(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck(), clang::CodeGen::CodeGenFunction::EmitVTableTypeCheckedLoad(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::CodeGen::CodeGenFunction::ExitSEHTryStmt(), clang::CodeGen::CallArgList::freeArgumentMemory(), clang::CodeGen::CodeGenFunction::LookupNeonLLVMIntrinsic(), packTBLDVectorList(), and clang::CodeGen::CodeGenPGO::valueProfile().
|
inline |
Definition at line 641 of file CodeGenModule.h.
References clang::CodeGen::CodeGenVTables::getItaniumVTableContext().
Referenced by BuildAppleKextVirtualCall().
|
inline |
Definition at line 614 of file CodeGenModule.h.
Referenced by buildBlockDescriptor(), clang::CodeGen::CGOpenMPRuntimeNVPTX::CGOpenMPRuntimeNVPTX(), clang::CodeGen::CodeGenFunction::CodeGenFunction(), CodeGenModule(), clang::CodeGen::CGDebugInfo::completeRequiredType(), clang::CodeGen::CGDebugInfo::completeType(), computeBlockInfo(), configureBlocksRuntimeObject(), createARCRuntimeFunction(), CreateGlobalInitOrDestructFunction(), clang::CodeGen::CreateGNUObjCRuntime(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitARCReclaimReturnedObject(), EmitBaseInitializer(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), emitCommonOMPTargetDirective(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::CGDebugInfo::EmitFunctionDecl(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), EmitGlobal(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolCleanup(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetEnterDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetExitDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetUpdateDirective(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::emitTargetFunctions(), clang::CodeGen::emitTargetGlobalVariable(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), enterBlockScope(), clang::CodeGen::CodeGenFunction::enterByrefCleanup(), GenerateStringLiteral(), clang::CodeGen::EHPersonality::get(), GetAddrOfRTTIDescriptor(), getAsmSrcLocInfo(), getBlockDescriptorType(), clang::CodeGen::TargetCodeGenInfo::getGlobalVarAddressSpace(), clang::CodeGen::CodeGenFunction::getInvokeDestImpl(), clang::CodeGen::CodeGenFunction::getLangOpts(), getLLVMLinkageForDeclarator(), getStaticDeclName(), getTerminateFn(), getTypeInfoLinkage(), hasMRCWeakIvars(), MaybeHandleStaticInExternC(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), tryCaptureAsConstant(), and UseOptimizedSetter().
|
inline |
Definition at line 631 of file CodeGenModule.h.
Referenced by AddDependentLib(), AddDetectMismatch(), clang::CodeGen::CoverageMappingModuleGen::addFunctionMappingRecord(), addLinkOptionsPostorder(), AddVTableTypeMetadata(), AppendLinkerOptions(), buildBlockDescriptor(), computeBlockInfo(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), CreateMetadataIdentifierForType(), DecorateInstructionWithInvariantGroup(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::CodeGen::CoverageMappingModuleGen::emit(), EmitAnnotationString(), clang::CodeGen::CodeGenPGO::emitCounterIncrement(), EmitGlobalDeclMetadata(), EmitGlobalNamedRegister(), clang::CodeGen::CodeGenFunction::EmitNVPTXDevicePrintfCallExpr(), EmitSignBit(), EmitSpecialRegisterBuiltin(), clang::CodeGen::CodeGenFunction::EmitTypeMetadataCodeForVCall(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck(), clang::CodeGen::CodeGenFunction::EmitVTableTypeCheckedLoad(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::ConstantAggregateBuilderBase::finishStruct(), GetAddrOfConstantCString(), getClangCallTerminateFn(), clang::CodeGen::swiftcall::SwiftAggLowering::getCoerceAndExpandTypes(), getGuardAbortFn(), getGuardAcquireFn(), getGuardReleaseFn(), getInitThreadAbortFn(), getInitThreadFooterFn(), getInitThreadHeaderFn(), clang::CodeGen::CodeGenFunction::getLLVMContext(), getNoObjCARCExceptionsMetadata(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CodeGen::CGOpenCLRuntime::getPipeType(), clang::CodeGen::CGOpenCLRuntime::getSamplerType(), clang::CodeGen::CodeGenFunction::getTerminateHandler(), clang::CodeGen::CodeGenVTables::getVTableType(), and clang::CodeGen::SanitizerMetadata::reportGlobalToASan().
| llvm::Constant * CodeGenModule::getLLVMLifetimeEndFn | ( | ) |
Lazily declare the .lifetime.end intrinsic.
Definition at line 1742 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, and getModule().
Referenced by clang::CodeGen::CodeGenFunction::EmitLifetimeEnd().
| llvm::Constant * CodeGenModule::getLLVMLifetimeStartFn | ( | ) |
Lazily declare the .lifetime.start intrinsic.
Definition at line 1733 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, and getModule().
Referenced by clang::CodeGen::CodeGenFunction::EmitLifetimeStart().
| llvm::GlobalValue::LinkageTypes CodeGenModule::getLLVMLinkageForDeclarator | ( | const DeclaratorDecl * | D, |
| GVALinkage | Linkage, | ||
| bool | IsConstantVariable | ||
| ) |
Returns LLVM linkage for a declarator.
Definition at line 2948 of file CodeGenModule.cpp.
References clang::ExternalLinkage, getLangOpts(), clang::ASTContext::getLangOpts(), clang::GVA_AvailableExternally, clang::GVA_DiscardableODR, clang::GVA_Internal, clang::GVA_StrongExternal, clang::GVA_StrongODR, clang::Decl::hasAttr(), clang::InternalLinkage, and isVarDeclStrongDefinition().
Referenced by getFunctionLinkage(), and getLLVMLinkageVarDefinition().
| llvm::GlobalValue::LinkageTypes CodeGenModule::getLLVMLinkageVarDefinition | ( | const VarDecl * | VD, |
| bool | IsConstant | ||
| ) |
Returns LLVM linkage for a declarator.
Definition at line 3016 of file CodeGenModule.cpp.
References getContext(), clang::ASTContext::GetGVALinkageForVariable(), and getLLVMLinkageForDeclarator().
Referenced by clang::CodeGen::CodeGenFunction::EmitVarDecl(), GetAddrOfGlobalTemporary(), and getThreadLocalWrapperLinkage().
|
inlinestatic |
Definition at line 686 of file CodeGenModule.h.
References clang::DefaultVisibility, clang::HiddenVisibility, and clang::ProtectedVisibility.
Referenced by setGlobalVisibility(), and setLinkageAndVisibilityForGV().
| StringRef CodeGenModule::getMangledName | ( | GlobalDecl | GD | ) |
Definition at line 701 of file CodeGenModule.cpp.
References Buffer, clang::CC_X86RegCall, clang::Ctor_Base, clang::Ctor_Complete, clang::GlobalDecl::getCanonicalDecl(), clang::GlobalDecl::getCtorType(), getCXXABI(), clang::TargetInfo::getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::IdentifierInfo::getName(), getTarget(), clang::TargetCXXABI::hasConstructorVariants(), clang::MangleContext::mangleCXXCtor(), clang::MangleContext::mangleCXXDtor(), clang::MangleContext::mangleName(), Result, and clang::MangleContext::shouldMangleDeclName().
Referenced by emitCommonOMPTargetDirective(), emitConstructorDestructorAlias(), EmitDeferredUnusedCoverageMappings(), EmitGlobal(), clang::CodeGen::emitTargetFunctions(), clang::CodeGen::emitTargetGlobalVariable(), EmitTentativeDefinition(), getAddrOfCXXStructor(), GetAddrOfFunction(), GetAddrOfGlobalVar(), getOrCreateStaticVarDecl(), getStaticDeclName(), and TryEmitDefinitionAsAlias().
| llvm::Constant * CodeGenModule::getMemberPointerConstant | ( | const UnaryOperator * | e | ) |
Definition at line 1514 of file CGExprConstant.cpp.
References clang::ast_matchers::decl, clang::CodeGen::CGCXXABI::EmitMemberDataPointer(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), getContext(), getCXXABI(), clang::ASTContext::getFieldOffset(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::ASTContext::toCharUnitsFromBits(), and clang::ast_matchers::type.
|
inline |
Definition at line 645 of file CodeGenModule.h.
References clang::CodeGen::CodeGenVTables::getMicrosoftVTableContext().
|
inline |
Definition at line 620 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), CreateGlobalInitOrDestructFunction(), CreateOrReplaceCXXRuntimeVariable(), createReferenceTemporary(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::CodeGen::CoverageMappingModuleGen::emit(), EmitAnnotationString(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitCopyToScratchpad(), emitCXXDestructor(), emitDestructorsFunction(), EmitGlobalAnnotations(), EmitGlobalDeclMetadata(), EmitGlobalNamedRegister(), emitInitWithReductionInitializer(), emitInterWarpCopyFunction(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitNVPTXDevicePrintfCallExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), emitOffloadingArrays(), emitOutlinedFunctionPrologue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), EmitTopLevelDecl(), emitUsed(), clang::CodeGen::CodeGenVTables::EmitVTTDefinition(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), GenerateStringLiteral(), GetAddrOfConstantCFString(), clang::CodeGen::ConstantAggregateBuilderBase::getAddrOfCurrentPosition(), GetAddrOfGlobalTemporary(), GetAddrOfUuidDescriptor(), getClangCallTerminateFn(), GetGlobalValue(), getInitThreadEpochPtr(), getIntrinsic(), getLLVMLifetimeEndFn(), getLLVMLifetimeStartFn(), getNVPTXBarrier(), getNVPTXCTABarrier(), getNVPTXNumThreads(), getNVPTXThreadID(), getNVPTXWarpSize(), getOrCreateStaticVarDecl(), getSanStats(), getTypeInfoVTable(), clang::CodeGen::CodeGenFunction::recoverAddrOfEscapedLocal(), Release(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), setPropertyExecutionMode(), setThunkProperties(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), TryEmitDefinitionAsAlias(), and clang::CodeGen::CodeGenPGO::valueProfile().
|
inline |
Definition at line 605 of file CodeGenModule.h.
Referenced by EmitTopLevelDecl(), clang::CodeGen::CodeGenVTables::GenerateClassData(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), and clang::CodeGen::CodeGenTypes::UpdateCompletedType().
| llvm::Constant * CodeGenModule::GetNonVirtualBaseClassOffset | ( | const CXXRecordDecl * | ClassDecl, |
| CastExpr::path_const_iterator | PathBegin, | ||
| CastExpr::path_const_iterator | PathEnd | ||
| ) |
Returns the offset from a derived class to a class.
Returns null if the offset is 0.
Definition at line 175 of file CGClass.cpp.
References computeNonVirtualBaseClassOffset(), clang::CodeGen::CodeGenTypes::ConvertType(), getContext(), clang::CharUnits::getQuantity(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenTypeCache::PtrDiffTy, and clang::CodeGen::Type.
Referenced by clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), and clang::CodeGen::CGCXXABI::getMemberPointerAdjustment().
|
inline |
Definition at line 607 of file CodeGenModule.h.
References getLLVMContext(), and clang::None.
| llvm::Constant * CodeGenModule::getNSConcreteGlobalBlock | ( | ) |
Definition at line 2480 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by buildGlobalBlock().
| llvm::Constant * CodeGenModule::getNSConcreteStackBlock | ( | ) |
Definition at line 2491 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
| llvm::Constant * CodeGenModule::getNullPointer | ( | llvm::PointerType * | T, |
| QualType | QT | ||
| ) |
Get target specific null pointer.
| T | is the LLVM type of the null pointer. |
| QT | is the clang QualType of the null pointer. |
Definition at line 1269 of file CGExprConstant.cpp.
References clang::CodeGen::TargetCodeGenInfo::getNullPointer(), and getTargetCodeGenInfo().
Referenced by buildGlobalBlock(), EmitConstantValue(), EmitNullConstant(), and clang::CodeGen::CodeGenFunction::EmitScalarInit().
|
inline |
Definition at line 543 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitARCAutorelease(), clang::CodeGen::CodeGenFunction::EmitARCAutoreleaseReturnValue(), clang::CodeGen::CodeGenFunction::EmitARCCopyWeak(), clang::CodeGen::CodeGenFunction::EmitARCDestroyWeak(), clang::CodeGen::CodeGenFunction::EmitARCInitWeak(), clang::CodeGen::CodeGenFunction::EmitARCIntrinsicUse(), clang::CodeGen::CodeGenFunction::EmitARCLoadWeak(), clang::CodeGen::CodeGenFunction::EmitARCLoadWeakRetained(), clang::CodeGen::CodeGenFunction::EmitARCMoveWeak(), clang::CodeGen::CodeGenFunction::EmitARCRelease(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseNonBlock(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseReturnValue(), clang::CodeGen::CodeGenFunction::EmitARCRetainBlock(), clang::CodeGen::CodeGenFunction::EmitARCRetainNonBlock(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrongCall(), clang::CodeGen::CodeGenFunction::EmitARCStoreWeak(), clang::CodeGen::CodeGenFunction::EmitARCUnsafeClaimAutoreleasedReturnValue(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolPush(), tryEmitFusedAutoreleaseOfResult(), and tryRemoveRetainOfSelf().
| QualType CodeGenModule::getObjCFastEnumerationStateType | ( | ) |
Retrieve the record type that describes the state of an Objective-C fast enumeration loop (for..in).
Definition at line 3500 of file CodeGenModule.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::ASTContext::buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getPointerType(), clang::ASTContext::getTagDeclType(), clang::ICIS_NoInit, clang::QualType::isNull(), clang::ArrayType::Normal, clang::Decl::setAccess(), clang::TagDecl::startDefinition(), and clang::ASTContext::UnsignedLongTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt().
|
inline |
Return a reference to the configured Objective-C runtime.
Definition at line 517 of file CodeGenModule.h.
Referenced by buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), EmitDeclInit(), clang::CodeGen::CodeGenFunction::EmitObjCAtSynchronizedStmt(), clang::CodeGen::CodeGenFunction::EmitObjCAtThrowStmt(), clang::CodeGen::CodeGenFunction::EmitObjCAtTryStmt(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), clang::CodeGen::CodeGenFunction::EmitObjCProtocolExpr(), clang::CodeGen::CodeGenFunction::EmitObjCSelectorExpr(), clang::CodeGen::CodeGenFunction::EmitObjCStringLiteral(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), and clang::CodeGen::CodeGenFunction::StartObjCMethod().
|
inline |
Return a reference to the configured OpenCL runtime.
Definition at line 526 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), createOpenCLIntToSamplerConversion(), and clang::CodeGen::CodeGenFunction::EmitVarDecl().
|
inline |
Return a reference to the configured OpenMP runtime.
Definition at line 532 of file CodeGenModule.h.
Referenced by createRuntimeShuffleFunction(), emitCommonOMPParallelDirective(), emitCommonOMPTargetDirective(), emitCommonOMPTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), emitInitWithReductionInitializer(), EmitOMPAtomicCaptureExpr(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicDirective(), EmitOMPAtomicReadExpr(), EmitOMPAtomicUpdateExpr(), EmitOMPAtomicWriteExpr(), clang::CodeGen::CodeGenFunction::EmitOMPBarrierDirective(), clang::CodeGen::CodeGenFunction::EmitOMPCancelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPCancellationPointDirective(), clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(), EmitOMPDeclareReduction(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPFlushDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPMasterDirective(), clang::CodeGen::CodeGenFunction::EmitOMPOrderedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPSectionDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSectionsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSingleDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDeviceFunction(), clang::CodeGen::CodeGenFunction::EmitOMPTargetEnterDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetExitDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDeviceFunction(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetUpdateDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskgroupDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskwaitDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskyieldDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDistributeSimdDirective(), EmitOMPThreadPrivateDecl(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReductionCombiner(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::CodeGen::CodeGenFunction::~CodeGenFunction().
| llvm::Constant * CodeGenModule::getOrCreateStaticVarDecl | ( | const VarDecl & | D, |
| llvm::GlobalValue::LinkageTypes | Linkage | ||
| ) |
Definition at line 204 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Ctor_Base, clang::Dtor_Base, EmitNullConstant(), clang::QualType::getAddressSpace(), GetAddrOfGlobal(), getContext(), clang::GlobalDecl::getDecl(), getDeclAlign(), GetGlobalVarAddressSpace(), getMangledName(), getModule(), clang::Decl::getNonClosureContext(), getStaticDeclName(), clang::ASTContext::getTargetAddressSpace(), getTargetCodeGenInfo(), getTypes(), clang::QualType::isConstant(), clang::Type::isConstantSizeType(), Name, clang::LangAS::opencl_local, clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), setGlobalVisibility(), setStaticLocalDeclAddress(), setTLSMode(), supportsCOMDAT(), and clang::CodeGen::Type.
Referenced by clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().
|
inline |
Definition at line 553 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters(), and clang::CodeGen::CodeGenPGO::valueProfile().
|
inline |
Definition at line 552 of file CodeGenModule.h.
|
inline |
Definition at line 617 of file CodeGenModule.h.
|
inline |
Definition at line 1139 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and clang::CodeGen::CodeGenFunction::InsertHelper().
| llvm::SanitizerStatReport & CodeGenModule::getSanStats | ( | ) |
Definition at line 4521 of file CodeGenModule.cpp.
References getModule().
Referenced by clang::CodeGen::CodeGenFunction::EmitSanitizerStatReport().
| llvm::ConstantInt * CodeGenModule::getSize | ( | CharUnits | numChars | ) |
Emit the given number of characters as a value of type size_t.
Definition at line 646 of file CodeGenModule.cpp.
References clang::CharUnits::getQuantity(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by clang::CodeGen::ConstantAggregateBuilderBase::addSize(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), emitPointerArithmetic(), emitStructGetterCall(), emitStructSetterCall(), and clang::CodeGen::CodeGenFunction::getTypeSize().
|
inline |
Definition at line 559 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPCopyinClause().
|
inline |
Definition at line 571 of file CodeGenModule.h.
|
inline |
Definition at line 625 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters(), BuildAppleKextVirtualCall(), configureBlocksRuntimeObject(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), createCXXABI(), CreateGlobalInitOrDestructFunction(), clang::CodeGen::CreateItaniumCXXABI(), clang::CodeGen::CodeGenFunction::EmitCapturedLocals(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CGCXXABI::EmitCtorCompleteObjectHandler(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitSEHExceptionCodeSave(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenFunction::EnterSEHTryStmt(), clang::CodeGen::CodeGenFunction::ExitSEHTryStmt(), clang::CodeGen::EHPersonality::get(), getCodegenToUse(), getMangledName(), getTargetCodeGenInfo(), getTerminateFn(), getVTableLinkage(), isThreadWrapperReplaceable(), clang::CodeGen::CodeGenVTables::isVTableExternal(), SetLLVMFunctionAttributesForDefinition(), and clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper().
| const TargetCodeGenInfo & CodeGenModule::getTargetCodeGenInfo | ( | ) |
Definition at line 8473 of file TargetInfo.cpp.
References clang::CodeGenOptions::FloatABI, clang::TargetInfo::getABI(), getTarget(), clang::TargetInfo::getTriple(), clang::None, and P.
Referenced by AddDependentLib(), AddDetectMismatch(), addLinkOptionsPostorder(), arrangeFreeFunctionLikeCall(), CodeGenModule(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), emitAutoreleasedReturnValueMarker(), GetAddrOfGlobalTemporary(), GetGlobalVarAddressSpace(), getNullPointer(), getOrCreateStaticVarDecl(), getSwiftABIInfo(), clang::CodeGen::CodeGenFunction::getTargetHooks(), InitCatchParam(), and clang::CodeGen::CodeGenFunction::StartFunction().
| CharUnits CodeGenModule::GetTargetTypeStoreSize | ( | llvm::Type * | Ty | ) | const |
Return the store size, in character units, of the given LLVM type.
Definition at line 2570 of file CodeGenModule.cpp.
References getDataLayout(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenFunction::emitByrefStructureInit().
| llvm::MDNode * CodeGenModule::getTBAAInfo | ( | QualType | QTy | ) |
Definition at line 576 of file CodeGenModule.cpp.
Referenced by clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
| llvm::MDNode * CodeGenModule::getTBAAInfoForVTablePtr | ( | ) |
Definition at line 582 of file CodeGenModule.cpp.
Referenced by clang::CodeGen::CodeGenFunction::GetVTablePtr(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointer().
| llvm::MDNode * CodeGenModule::getTBAAStructInfo | ( | QualType | QTy | ) |
Definition at line 588 of file CodeGenModule.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitAggregateCopy().
| llvm::MDNode * CodeGenModule::getTBAAStructTagInfo | ( | QualType | BaseTy, |
| llvm::MDNode * | AccessN, | ||
| uint64_t | O | ||
| ) |
Return the path-aware tag for given base type, access node and offset.
Definition at line 594 of file CodeGenModule.cpp.
| llvm::Constant * CodeGenModule::getTerminateFn | ( | ) |
Get the declaration of std::terminate for the platform.
Definition at line 50 of file CGException.cpp.
References clang::frontend::CPlusPlus, CreateRuntimeFunction(), getCXXABI(), getLangOpts(), getTarget(), clang::ObjCRuntime::hasTerminate(), clang::LangOptions::MSVC2015, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), and getClangCallTerminateFn().
|
inline |
Definition at line 626 of file CodeGenModule.h.
References clang::TargetInfo::getTriple().
Referenced by createARCRuntimeFunction(), CreateRuntimeFunction(), clang::CodeGen::emitDeclareSimdFunction(), GetAddrOfConstantCFString(), getTypeInfoLinkage(), HasHiddenLTOVisibility(), Release(), ShouldUseExternalRTTIDescriptor(), supportsCOMDAT(), and TryEmitDefinitionAsAlias().
|
inline |
Definition at line 598 of file CodeGenModule.h.
|
inline |
Definition at line 637 of file CodeGenModule.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::CodeGen::arrangeCXXMethodType(), clang::CodeGen::arrangeFreeFunctionCall(), clang::CodeGen::arrangeFreeFunctionType(), clang::CodeGen::arrangeObjCMessageSendSignature(), clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualDestructorCall(), buildBlockDescriptor(), buildGlobalBlock(), canEmitDelegateCallArgs(), codegenCXXStructor(), computeBlockInfo(), clang::CodeGen::computeSPIRKernelABIInfo(), clang::CodeGen::convertFreeFunctionType(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::convertTypeForMemory(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::CodeGen::CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(), createOffloadingBinaryDescriptorFunction(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), emitAtomicLibcall(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), emitCombinerOrInitializer(), EmitConstantExpr(), EmitConstantInit(), EmitConstantValue(), EmitConstantValueForMemory(), emitCopyprivateCopyFunction(), emitCopyToScratchpad(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), emitDestructorsFunction(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), EmitFunctionDeclPointer(), EmitGlobal(), emitInterWarpCopyFunction(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), EmitNewDeleteCall(), EmitNullConstant(), EmitNullConstant(), EmitNullConstantForBase(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), emitOutlinedFunctionPrologue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitShuffleAndReduceFunction(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenFunction::generateThunk(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), GetAddrOfConstantCFString(), getAddrOfCXXStructor(), GetAddrOfFunction(), GetAddrOfGlobal(), GetAddrOfGlobalTemporary(), GetAddrOfGlobalVar(), GetAddrOfThunk(), getBlockDescriptorType(), clang::CodeGen::CGCXXABI::GetBogusMemberPointer(), GetConstantArrayFromStringLiteral(), getGuardAcquireFn(), clang::CodeGen::CGObjCRuntime::getMessageSendInfo(), getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenFunction::getTypes(), GetWeakRefReference(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and TryEmitDefinitionAsAlias().
|
inline |
Fetches the global unique block count.
Definition at line 784 of file CodeGenModule.h.
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable().
| CharUnits CodeGenModule::getVBaseAlignment | ( | CharUnits | actualDerivedAlign, |
| const CXXRecordDecl * | derivedClass, | ||
| const CXXRecordDecl * | vbaseClass | ||
| ) |
Returns the assumed alignment of a virtual base of a class.
Return the best known alignment for a pointer to a virtual base, given the alignment of a pointer to the derived class.
Definition at line 55 of file CGClass.cpp.
References clang::ASTContext::getASTRecordLayout(), getContext(), getDynamicOffsetAlignment(), and clang::TagDecl::isCompleteDefinition().
Referenced by ApplyNonVirtualAndVirtualOffset().
| llvm::GlobalVariable::LinkageTypes CodeGenModule::getVTableLinkage | ( | const CXXRecordDecl * | RD | ) |
Return the appropriate linkage for the vtable, VTT, and type information of the given class.
Compute the required linkage of the vtable for the given class.
Note that we only call this at the end of the translation unit.
Definition at line 730 of file CGVTables.cpp.
References clang::ExternalLinkage, clang::ASTContext::getCurrentKeyFunction(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getLangOpts(), getTarget(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::InternalLinkage, clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isInlined(), clang::TargetCXXABI::isMicrosoft(), clang::codegenoptions::NoDebugInfo, shouldEmitAvailableExternallyVTable(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by clang::CodeGen::CGDebugInfo::completeClassData(), and getTypeInfoLinkage().
|
inline |
Definition at line 639 of file CodeGenModule.h.
Referenced by emitCXXDestructor(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), shouldEmitVTableAtEndOfTranslationUnit(), and ShouldUseExternalRTTIDescriptor().
| ConstantAddress CodeGenModule::GetWeakRefReference | ( | const ValueDecl * | VD | ) |
Get a reference to the target of VD.
Definition at line 1663 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Decl::getAttr(), getContext(), clang::ASTContext::getDeclAlign(), GetGlobalValue(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), getTypes(), and clang::CodeGen::Type.
Referenced by EmitFunctionDeclPointer().
| void CodeGenModule::HandleCXXStaticMemberVarInstantiation | ( | VarDecl * | VD | ) |
Tell the consumer that this variable has been instantiated.
Definition at line 3138 of file CodeGenModule.cpp.
References clang::VarDecl::Definition, EmitTopLevelDecl(), GetAddrOfGlobalVar(), clang::VarDecl::getDefinition(), clang::VarDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::VarDecl::isThisDeclarationADefinition(), and clang::TSK_ExplicitInstantiationDefinition.
| bool CodeGenModule::HasHiddenLTOVisibility | ( | const CXXRecordDecl * | RD | ) |
Returns whether the given record has hidden LTO visibility and therefore may participate in (single-module) CFI and whole-program vtable optimization.
Definition at line 912 of file CGVTables.cpp.
References getCodeGenOpts(), clang::LinkageInfo::getLinkage(), clang::NamedDecl::getLinkageAndVisibility(), clang::DeclContext::getParent(), getTriple(), clang::LinkageInfo::getVisibility(), clang::Decl::hasAttr(), clang::HiddenVisibility, and clang::isExternallyVisible().
Referenced by clang::CodeGen::CodeGenFunction::EmitTypeMetadataCodeForVCall(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheck(), and clang::CodeGen::CodeGenFunction::ShouldEmitVTableTypeCheckedLoad().
|
inline |
Return true iff an Objective-C runtime has been configured.
Definition at line 523 of file CodeGenModule.h.
| bool CodeGenModule::imbueXRayAttrs | ( | llvm::Function * | Fn, |
| SourceLocation | Loc, | ||
| StringRef | Category = StringRef() |
||
| ) | const |
Imbue XRay attributes to a function, applying the always/never attribute lists in the process.
Returns true if we did imbue attributes this way, false otherwise.
Definition at line 1580 of file CodeGenModule.cpp.
References getContext(), clang::ASTContext::getXRayFilter(), clang::SourceLocation::isValid(), and clang::XRayFunctionFilter::NONE.
Referenced by clang::CodeGen::CodeGenFunction::StartFunction().
| bool CodeGenModule::isInSanitizerBlacklist | ( | llvm::Function * | Fn, |
| SourceLocation | Loc | ||
| ) | const |
Definition at line 1533 of file CodeGenModule.cpp.
References getContext(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getMainFileID(), clang::ASTContext::getSanitizerBlacklist(), clang::ASTContext::getSourceManager(), clang::SanitizerBlacklist::isBlacklistedLocation(), clang::SourceLocation::isValid(), and SM.
Referenced by CreateGlobalInitOrDestructFunction(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), and clang::CodeGen::CodeGenFunction::StartFunction().
| bool CodeGenModule::isInSanitizerBlacklist | ( | llvm::GlobalVariable * | GV, |
| SourceLocation | Loc, | ||
| QualType | Ty, | ||
| StringRef | Category = StringRef() |
||
| ) | const |
Definition at line 1551 of file CodeGenModule.cpp.
References Category, clang::QualType::getAsString(), clang::QualType::getCanonicalType(), getContext(), clang::ASTContext::getSanitizerBlacklist(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::SanitizerSet::hasOneOf(), clang::QualType::isNull(), clang::Type::isRecordType(), and clang::LangOptions::Sanitize.
Definition at line 653 of file CodeGenTypes.cpp.
References clang::Type::castAs().
| bool CodeGenModule::isPaddedAtomicType | ( | const AtomicType * | type | ) |
Definition at line 657 of file CodeGenTypes.cpp.
References clang::ASTContext::getTypeSize(), and clang::AtomicType::getValueType().
isTypeConstant - Determine whether an object of this type can be emitted as a constant.
If ExcludeCtor is true, the duration when the object's constructor runs will not be considered. The caller will need to verify that the object is not written to during its construction.
Definition at line 2295 of file CodeGenModule.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getLangOpts(), clang::QualType::isConstant(), and clang::Type::isReferenceType().
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), createReferenceTemporary(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), and GetAddrOfGlobalTemporary().
| bool CodeGenModule::lookupRepresentativeDecl | ( | StringRef | MangledName, |
| GlobalDecl & | Result | ||
| ) | const |
Definition at line 4281 of file CodeGenModule.cpp.
| void CodeGenModule::MaybeHandleStaticInExternC | ( | const SomeDecl * | D, |
| llvm::GlobalValue * | GV | ||
| ) |
If the declaration has internal linkage but is inside an extern "C" linkage specification, prepare to emit an alias for it to the expected name.
Definition at line 2600 of file CodeGenModule.cpp.
References clang::frontend::CPlusPlus, getLangOpts(), and clang::InternalLinkage.
| void CodeGenModule::maybeSetTrivialComdat | ( | const Decl & | D, |
| llvm::GlobalObject & | GO | ||
| ) |
Definition at line 2657 of file CodeGenModule.cpp.
References shouldBeInCOMDAT().
Referenced by emitCXXConstructor().
| bool CodeGenModule::NeedAllVtablesTypeId | ( | ) | const |
Returns whether this module needs the "all-vtables" type identifier.
Definition at line 4460 of file CodeGenModule.cpp.
References clang::SanitizerSet::has(), clang::LangOptions::Sanitize, and clang::CodeGenOptions::SanitizeTrap.
Referenced by AddVTableTypeMetadata().
| void CodeGenModule::RefreshTypeCacheForClass | ( | const CXXRecordDecl * | Class | ) |
Definition at line 571 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass().
| void CodeGenModule::Release | ( | ) |
Finalize LLVM code generation.
Definition at line 383 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), clang::CodeGen::CodeGenFunction::EmitCfiCheckStub(), EmitDeferredUnusedCoverageMappings(), EmitGlobalAnnotations(), clang::serialized_diags::Error, getCodeGenOpts(), getDiags(), clang::ASTContext::getLangOpts(), getModule(), clang::ASTContext::getTargetInfo(), getTriple(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSizeInChars(), clang::TargetInfo::getWCharWidth(), clang::ASTContext::getWideCharType(), clang::CodeGen::InstrProfStats::hasDiagnostics(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::InstrProfStats::reportDiagnostics(), and clang::serialized_diags::Warning.
| bool CodeGenModule::ReturnSlotInterferesWithArgs | ( | const CGFunctionInfo & | FI | ) |
Return true iff the given type uses an argument slot when 'sret' is used as a return type.
Definition at line 1480 of file CGCall.cpp.
Referenced by clang::CodeGen::CodeGenFunction::GenerateBlockFunction().
Return true iff the given type uses 'fp2ret' when used as a return type.
Definition at line 1502 of file CGCall.cpp.
References clang::Type::getAs().
Return true iff the given type uses 'fpret' when used as a return type.
Definition at line 1485 of file CGCall.cpp.
References clang::TargetInfo::Double, clang::TargetInfo::Float, clang::Type::getAs(), and clang::TargetInfo::LongDouble.
| bool CodeGenModule::ReturnTypeUsesSRet | ( | const CGFunctionInfo & | FI | ) |
Return true iff the given type uses 'sret' when used as a return type.
Definition at line 1476 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::getReturnInfo(), and clang::CodeGen::ABIArgInfo::isIndirect().
Referenced by clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk().
| void CodeGenModule::setAddrOfConstantCompoundLiteral | ( | const CompoundLiteralExpr * | CLE, |
| llvm::GlobalVariable * | GV | ||
| ) |
Notes that CLE's GlobalVariable is GV.
Asserts that CLE isn't already emitted.
Definition at line 1500 of file CGExprConstant.cpp.
| void CodeGenModule::setAddrOfGlobalBlock | ( | const BlockExpr * | BE, |
| llvm::Constant * | Addr | ||
| ) |
Notes that BE's global block is available via Addr.
Asserts that BE isn't already emitted.
Definition at line 1096 of file CGBlocks.cpp.
Referenced by buildGlobalBlock().
| void CodeGenModule::setAliasAttributes | ( | const Decl * | D, |
| llvm::GlobalValue * | GV | ||
| ) |
Set attributes which must be preserved by an alias.
This includes common attributes (i.e. it includes a call to SetCommonAttributes).
NOTE: This should only be called for definitions.
Definition at line 1049 of file CodeGenModule.cpp.
References clang::Decl::hasAttr(), and SetCommonAttributes().
Referenced by emitConstructorDestructorAlias(), and TryEmitDefinitionAsAlias().
|
inline |
Definition at line 593 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction().
|
inline |
Definition at line 585 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction().
| void CodeGenModule::SetCommonAttributes | ( | const Decl * | D, |
| llvm::GlobalValue * | GV | ||
| ) |
Set attributes which are common to any form of a global definition (alias, Objective-C method, function, global variable).
NOTE: This should only be called for definitions.
Definition at line 1038 of file CodeGenModule.cpp.
References addUsedGlobal(), clang::DefaultVisibility, clang::Decl::hasAttr(), and setGlobalVisibility().
Referenced by setAliasAttributes().
| void CodeGenModule::setFunctionDefinitionAttributes | ( | const FunctionDecl * | D, |
| llvm::Function * | F | ||
| ) |
Set attributes for a global definition.
Definition at line 881 of file CodeGenModule.cpp.
Referenced by codegenCXXStructor().
| void CodeGenModule::setFunctionDLLStorageClass | ( | GlobalDecl | GD, |
| llvm::Function * | F | ||
| ) |
Set the DLL storage class on F.
Definition at line 855 of file CodeGenModule.cpp.
References getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), and clang::CodeGen::CGCXXABI::useThunkForDtorVariant().
Referenced by codegenCXXStructor().
|
inline |
Definition at line 1077 of file CodeGenModule.h.
References getFunctionLinkage().
Referenced by codegenCXXStructor(), and setThunkProperties().
| void CodeGenModule::setGlobalVisibility | ( | llvm::GlobalValue * | GV, |
| const NamedDecl * | D | ||
| ) | const |
Set the visibility for the given LLVM GlobalValue.
Definition at line 650 of file CodeGenModule.cpp.
References clang::DefaultVisibility, clang::NamedDecl::getLinkageAndVisibility(), GetLLVMVisibility(), clang::LinkageInfo::getVisibility(), and clang::LinkageInfo::isVisibilityExplicit().
Referenced by clang::CodeGen::CodeGenVTables::EmitVTTDefinition(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), GetAddrOfGlobalTemporary(), getOrCreateStaticVarDecl(), SetCommonAttributes(), and setThunkVisibility().
| void CodeGenModule::SetInternalFunctionAttributes | ( | const Decl * | D, |
| llvm::Function * | F, | ||
| const CGFunctionInfo & | FI | ||
| ) |
Set the attributes on the LLVM function for the given decl and function info.
This applies attributes necessary for handling the ABI as well as user specified attributes like section.
Definition at line 1086 of file CodeGenModule.cpp.
References clang::InternalLinkage, SetLLVMFunctionAttributes(), and SetLLVMFunctionAttributesForDefinition().
Referenced by CreateGlobalInitOrDestructFunction(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitCopyToScratchpad(), emitDestructorsFunction(), emitInterWarpCopyFunction(), emitOutlinedFunctionPrologue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitShuffleAndReduceFunction(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), and clang::CodeGen::CodeGenFunction::StartObjCMethod().
| void CodeGenModule::SetLLVMFunctionAttributes | ( | const Decl * | D, |
| const CGFunctionInfo & | Info, | ||
| llvm::Function * | F | ||
| ) |
Set the LLVM function attributes (sext, zext, etc).
Definition at line 886 of file CodeGenModule.cpp.
References ConstructAttributeList().
Referenced by SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper().
| void CodeGenModule::SetLLVMFunctionAttributesForDefinition | ( | const Decl * | D, |
| llvm::Function * | F | ||
| ) |
Set the LLVM function attributes which only apply to a function definition.
Definition at line 916 of file CodeGenModule.cpp.
References CreateFunctionTypeMetadata(), clang::ASTContext::getCharWidth(), getCXXABI(), clang::Decl::getMaxAlignment(), getTarget(), clang::Decl::hasAttr(), hasUnwindExceptions(), clang::CodeGenOptions::OnlyAlwaysInlining, clang::CodeGenOptions::OnlyHintInlining, clang::LangOptions::SSPOn, clang::LangOptions::SSPReq, and clang::LangOptions::SSPStrong.
Referenced by codegenCXXStructor(), and SetInternalFunctionAttributes().
|
inline |
Definition at line 562 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and getOrCreateStaticVarDecl().
|
inline |
Definition at line 574 of file CodeGenModule.h.
| void CodeGenModule::setTLSMode | ( | llvm::GlobalValue * | GV, |
| const VarDecl & | D | ||
| ) | const |
Set the TLS mode for the given LLVM GlobalValue for the thread-local variable declaration D.
Definition at line 687 of file CodeGenModule.cpp.
References clang::Decl::getAttr(), GetLLVMTLSModel(), and clang::VarDecl::getTLSKind().
Referenced by GetAddrOfGlobalTemporary(), and getOrCreateStaticVarDecl().
|
inline |
Definition at line 601 of file CodeGenModule.h.
|
inline |
Definition at line 633 of file CodeGenModule.h.
| bool CodeGenModule::supportsCOMDAT | ( | ) | const |
Definition at line 8469 of file TargetInfo.cpp.
References getTriple().
Referenced by CreateOrReplaceCXXRuntimeVariable(), clang::CodeGen::CodeGenVTables::EmitVTTDefinition(), GenerateStringLiteral(), GetAddrOfGlobalTemporary(), GetAddrOfUuidDescriptor(), getClangCallTerminateFn(), getOrCreateStaticVarDecl(), setThunkProperties(), and shouldBeInCOMDAT().
| bool CodeGenModule::TryEmitBaseDestructorAsAlias | ( | const CXXDestructorDecl * | D | ) |
Try to emit a base destructor as an alias to its primary base-class destructor.
Definition at line 34 of file CGCXX.cpp.
References clang::CodeGen::Base, clang::CXXRecordDecl::bases(), clang::Dtor_Base, clang::RecordDecl::field_empty(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getCodeGenOpts(), clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::FunctionDecl::hasTrivialBody(), I, clang::CharUnits::isZero(), clang::RecordDecl::mayInsertExtraPadding(), and TryEmitDefinitionAsAlias().
Referenced by emitCXXDestructor().
| bool CodeGenModule::TryEmitDefinitionAsAlias | ( | GlobalDecl | AliasDecl, |
| GlobalDecl | TargetDecl, | ||
| bool | InEveryTU | ||
| ) |
Try to emit a definition as a global alias for another definition.
If InEveryTU is true, we know that an equivalent alias can be produced in every translation unit.
Definition at line 120 of file CGCXX.cpp.
References addReplacement(), clang::serialized_diags::create(), GetAddrOfGlobal(), getCodeGenOpts(), clang::GlobalDecl::getDecl(), getFunctionLinkage(), clang::CodeGen::CodeGenTypes::GetFunctionType(), GetGlobalValue(), getMangledName(), getModule(), getTriple(), getTypes(), setAliasAttributes(), and clang::CodeGen::Type.
Referenced by emitCXXDestructor(), and TryEmitBaseDestructorAsAlias().
| void CodeGenModule::UpdateCompletedType | ( | const TagDecl * | TD | ) |
Definition at line 566 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::UpdateCompletedType().
| llvm::FoldingSet<BlockByrefHelpers> clang::CodeGen::CodeGenModule::ByrefHelpersCache |
Definition at line 781 of file CodeGenModule.h.
Referenced by buildByrefHelpers().
| int clang::CodeGen::CodeGenModule::GlobalUniqueCount |
Definition at line 478 of file CodeGenModule.h.
| llvm::Constant* clang::CodeGen::CodeGenModule::IsOSVersionAtLeastFn = nullptr |
Definition at line 550 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinAvailable().
1.8.6