clang API Documentation
#include <CodeGenModule.h>
Classes | |
class | ByrefHelpers |
A pair of helper functions for a __block variable. More... | |
struct | DeferredGlobal |
struct | GlobalInitPriorityCmp |
struct | Structor |
Public Member Functions | |
CodeGenModule (ASTContext &C, const CodeGenOptions &CodeGenOpts, llvm::Module &M, const llvm::DataLayout &TD, DiagnosticsEngine &Diags, CoverageSourceInfo *CoverageInfo=nullptr) | |
~CodeGenModule () | |
void | clear () |
void | Release () |
Finalize LLVM code generation. | |
CGObjCRuntime & | getObjCRuntime () |
Return a reference to the configured Objective-C runtime. | |
bool | hasObjCRuntime () |
Return true iff an Objective-C runtime has been configured. | |
CGOpenCLRuntime & | getOpenCLRuntime () |
Return a reference to the configured OpenCL runtime. | |
CGOpenMPRuntime & | getOpenMPRuntime () |
Return a reference to the configured OpenMP runtime. | |
CGCUDARuntime & | getCUDARuntime () |
Return a reference to the configured CUDA runtime. | |
ARCEntrypoints & | getARCEntrypoints () const |
RREntrypoints & | getRREntrypoints () 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 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 |
CGCXXABI & | getCXXABI () const |
llvm::LLVMContext & | getLLVMContext () |
bool | shouldUseTBAA () const |
const TargetCodeGenInfo & | getTargetCodeGenInfo () |
CodeGenTypes & | getTypes () |
CodeGenVTables & | getVTables () |
ItaniumVTableContext & | getItaniumVTableContext () |
MicrosoftVTableContext & | getMicrosoftVTableContext () |
llvm::MDNode * | getTBAAInfo (QualType QTy) |
llvm::MDNode * | getTBAAInfoForVTablePtr () |
llvm::MDNode * | getTBAAStructInfo (QualType QTy) |
llvm::MDNode * | getTBAAStructTypeInfo (QualType QTy) |
Return the MDNode in the type DAG for the given struct type. | |
llvm::MDNode * | getTBAAStructTagInfo (QualType BaseTy, llvm::MDNode *AccessN, uint64_t O) |
Return the path-aware tag for given base type, access node and offset. | |
bool | isTypeConstant (QualType QTy, bool ExcludeCtorDtor) |
bool | isPaddedAtomicType (QualType type) |
bool | isPaddedAtomicType (const AtomicType *type) |
void | DecorateInstruction (llvm::Instruction *Inst, llvm::MDNode *TBAAInfo, bool ConvertTypeToTag=true) |
llvm::ConstantInt * | getSize (CharUnits numChars) |
Emit the given number of characters as a value of type size_t. | |
void | setGlobalVisibility (llvm::GlobalValue *GV, const NamedDecl *D) const |
Set the visibility for the given LLVM GlobalValue. | |
void | setTLSMode (llvm::GlobalValue *GV, const VarDecl &D) const |
llvm::Constant * | GetAddrOfGlobal (GlobalDecl GD) |
llvm::GlobalVariable * | CreateOrReplaceCXXRuntimeVariable (StringRef Name, llvm::Type *Ty, llvm::GlobalValue::LinkageTypes Linkage) |
llvm::Function * | CreateGlobalInitOrDestructFunction (llvm::FunctionType *ty, const Twine &name, SourceLocation Loc=SourceLocation(), bool TLS=false) |
unsigned | GetGlobalVarAddressSpace (const VarDecl *D, unsigned AddrSpace) |
llvm::Constant * | GetAddrOfGlobalVar (const VarDecl *D, llvm::Type *Ty=nullptr) |
llvm::Constant * | GetAddrOfFunction (GlobalDecl GD, llvm::Type *Ty=0, bool ForVTable=false, bool DontDefer=false) |
llvm::Constant * | GetAddrOfRTTIDescriptor (QualType Ty, bool ForEH=false) |
Get the address of the RTTI descriptor for the given type. | |
llvm::Constant * | GetAddrOfUuidDescriptor (const CXXUuidofExpr *E) |
Get the address of a uuid descriptor . | |
llvm::Constant * | GetAddrOfThunk (GlobalDecl GD, const ThunkInfo &Thunk) |
Get the address of the thunk for the given global decl. | |
llvm::Constant * | GetWeakRefReference (const ValueDecl *VD) |
Get a reference to the target of VD. | |
llvm::Constant * | GetNonVirtualBaseClassOffset (const CXXRecordDecl *ClassDecl, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd) |
int | getUniqueBlockCount () |
Fetches the global unique block count. | |
llvm::Type * | getBlockDescriptorType () |
Fetches the type of a generic block descriptor. | |
llvm::Type * | getGenericBlockLiteralType () |
The type of a generic block literal. | |
llvm::Constant * | GetAddrOfGlobalBlock (const BlockExpr *BE, const char *) |
Gets the address of a block which requires no captures. | |
llvm::Constant * | GetAddrOfConstantCFString (const StringLiteral *Literal) |
Return a pointer to a constant CFString object for the given string. | |
llvm::Constant * | GetAddrOfConstantString (const StringLiteral *Literal) |
llvm::Constant * | GetConstantArrayFromStringLiteral (const StringLiteral *E) |
Return a constant array for the given string. | |
llvm::GlobalVariable * | GetAddrOfConstantStringFromLiteral (const StringLiteral *S, StringRef Name=".str") |
Return a pointer to a constant array for the given string literal. | |
llvm::GlobalVariable * | GetAddrOfConstantStringFromObjCEncode (const ObjCEncodeExpr *) |
Return a pointer to a constant array for the given ObjCEncodeExpr node. | |
llvm::GlobalVariable * | GetAddrOfConstantCString (const std::string &Str, const char *GlobalName=nullptr, unsigned Alignment=0) |
llvm::Constant * | GetAddrOfConstantCompoundLiteral (const CompoundLiteralExpr *E) |
llvm::Constant * | GetAddrOfGlobalTemporary (const MaterializeTemporaryExpr *E, const Expr *Inner) |
Returns a pointer to a global variable representing a temporary with static or thread storage duration. | |
QualType | getObjCFastEnumerationStateType () |
Retrieve the record type that describes the state of an Objective-C fast enumeration loop (for..in). | |
llvm::Function * | codegenCXXStructor (const CXXMethodDecl *MD, StructorType Type) |
llvm::GlobalValue * | getAddrOfCXXStructor (const CXXMethodDecl *MD, StructorType Type, const CGFunctionInfo *FnInfo=nullptr, llvm::FunctionType *FnType=nullptr, bool DontDefer=false) |
Return the address of the constructor/destructor of the given type. | |
llvm::Value * | getBuiltinLibFunction (const FunctionDecl *FD, unsigned BuiltinID) |
llvm::Function * | getIntrinsic (unsigned IID, ArrayRef< llvm::Type * > Tys=None) |
void | EmitTopLevelDecl (Decl *D) |
Emit code for a single top level declaration. | |
void | AddDeferredUnusedCoverageMapping (Decl *D) |
Stored a deferred empty coverage mapping for an unused and thus uninstrumented top level declaration. | |
void | ClearUnusedCoverageMapping (const Decl *D) |
Remove the deferred empty coverage mapping as this declaration is actually instrumented. | |
void | EmitDeferredUnusedCoverageMappings () |
Emit all the deferred coverage mappings for the uninstrumented functions. | |
void | HandleCXXStaticMemberVarInstantiation (VarDecl *VD) |
Tell the consumer that this variable has been instantiated. | |
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. | |
void | addUsedGlobal (llvm::GlobalValue *GV) |
Add a global to a list to be added to the llvm.used metadata. | |
void | addCompilerUsedGlobal (llvm::GlobalValue *GV) |
Add a global to a list to be added to the llvm.compiler.used metadata. | |
void | AddCXXDtorEntry (llvm::Constant *DtorFn, llvm::Constant *Object) |
Add a destructor and object to add to the C++ global destructor function. | |
llvm::Constant * | CreateRuntimeFunction (llvm::FunctionType *Ty, StringRef Name, llvm::AttributeSet ExtraAttrs=llvm::AttributeSet()) |
Create a new runtime function with the specified type and name. | |
llvm::Constant * | CreateRuntimeVariable (llvm::Type *Ty, StringRef Name) |
Create a new runtime global variable with the specified type and name. | |
llvm::Constant * | getLLVMLifetimeStartFn () |
Lazily declare the .lifetime.start intrinsic. | |
llvm::Constant * | getLLVMLifetimeEndFn () |
Lazily declare the .lifetime.end intrinsic. | |
void | UpdateCompletedType (const TagDecl *TD) |
llvm::Constant * | getMemberPointerConstant (const UnaryOperator *e) |
llvm::Constant * | EmitConstantInit (const VarDecl &D, CodeGenFunction *CGF=nullptr) |
llvm::Constant * | EmitConstantExpr (const Expr *E, QualType DestType, CodeGenFunction *CGF=nullptr) |
llvm::Constant * | EmitConstantValue (const APValue &Value, QualType DestType, CodeGenFunction *CGF=nullptr) |
llvm::Constant * | EmitConstantValueForMemory (const APValue &Value, QualType DestType, CodeGenFunction *CGF=nullptr) |
llvm::Constant * | EmitNullConstant (QualType T) |
llvm::Constant * | EmitNullConstantForBase (const CXXRecordDecl *Record) |
void | Error (SourceLocation loc, StringRef error) |
Emit a general error that something can't be done. | |
void | ErrorUnsupported (const Stmt *S, const char *Type) |
Print out an error that codegen doesn't support the specified stmt yet. | |
void | ErrorUnsupported (const Decl *D, const char *Type) |
Print out an error that codegen doesn't support the specified decl yet. | |
void | SetInternalFunctionAttributes (const Decl *D, llvm::Function *F, const CGFunctionInfo &FI) |
void | SetLLVMFunctionAttributes (const Decl *D, const CGFunctionInfo &Info, llvm::Function *F) |
Set the LLVM function attributes (sext, zext, etc). | |
void | SetLLVMFunctionAttributesForDefinition (const Decl *D, llvm::Function *F) |
bool | ReturnTypeUsesSRet (const CGFunctionInfo &FI) |
Return true iff the given type uses 'sret' when used as a return type. | |
bool | ReturnSlotInterferesWithArgs (const CGFunctionInfo &FI) |
bool | ReturnTypeUsesFPRet (QualType ResultType) |
Return true iff the given type uses 'fpret' when used as a return type. | |
bool | ReturnTypeUsesFP2Ret (QualType ResultType) |
Return true iff the given type uses 'fp2ret' when used as a return type. | |
void | ConstructAttributeList (const CGFunctionInfo &Info, const Decl *TargetDecl, AttributeListType &PAL, unsigned &CallingConv, bool AttrOnCallSite) |
StringRef | getMangledName (GlobalDecl GD) |
StringRef | getBlockMangledName (GlobalDecl GD, const BlockDecl *BD) |
void | EmitTentativeDefinition (const VarDecl *D) |
void | EmitVTable (CXXRecordDecl *Class, bool DefinitionRequired) |
void | EmitFundamentalRTTIDescriptors () |
Emit the RTTI descriptors for the builtin types. | |
void | AppendLinkerOptions (StringRef Opts) |
Appends Opts to the "Linker Options" metadata value. | |
void | AddDetectMismatch (StringRef Name, StringRef Value) |
Appends a detect mismatch command to the linker options. | |
void | AddDependentLib (StringRef Lib) |
Appends a dependent lib to the "Linker Options" metadata value. | |
llvm::GlobalVariable::LinkageTypes | getFunctionLinkage (GlobalDecl GD) |
void | setFunctionLinkage (GlobalDecl GD, llvm::Function *F) |
llvm::GlobalVariable::LinkageTypes | getVTableLinkage (const CXXRecordDecl *RD) |
CharUnits | GetTargetTypeStoreSize (llvm::Type *Ty) const |
Return the store size, in character units, of the given LLVM type. | |
llvm::GlobalValue::LinkageTypes | getLLVMLinkageForDeclarator (const DeclaratorDecl *D, GVALinkage Linkage, bool IsConstantVariable) |
Returns LLVM linkage for a declarator. | |
llvm::GlobalValue::LinkageTypes | getLLVMLinkageVarDefinition (const VarDecl *VD, bool IsConstant) |
Returns LLVM linkage for a declarator. | |
void | EmitGlobalAnnotations () |
Emit all the global annotations. | |
llvm::Constant * | EmitAnnotationString (StringRef Str) |
Emit an annotation string. | |
llvm::Constant * | EmitAnnotationUnit (SourceLocation Loc) |
Emit the annotation's translation unit. | |
llvm::Constant * | EmitAnnotationLineNo (SourceLocation L) |
Emit the annotation line number. | |
llvm::Constant * | EmitAnnotateAttr (llvm::GlobalValue *GV, const AnnotateAttr *AA, SourceLocation L) |
void | AddGlobalAnnotations (const ValueDecl *D, llvm::GlobalValue *GV) |
bool | isInSanitizerBlacklist (llvm::Function *Fn, SourceLocation Loc) const |
bool | isInSanitizerBlacklist (llvm::GlobalVariable *GV, SourceLocation Loc, QualType Ty, StringRef Category=StringRef()) const |
SanitizerMetadata * | getSanitizerMetadata () |
void | addDeferredVTable (const CXXRecordDecl *RD) |
void | EmitGlobal (GlobalDecl D) |
bool | TryEmitDefinitionAsAlias (GlobalDecl Alias, GlobalDecl Target, bool InEveryTU) |
bool | TryEmitBaseDestructorAsAlias (const CXXDestructorDecl *D) |
void | setFunctionDefinitionAttributes (const FunctionDecl *D, llvm::Function *F) |
Set attributes for a global definition. | |
llvm::GlobalValue * | GetGlobalValue (StringRef Ref) |
void | SetCommonAttributes (const Decl *D, llvm::GlobalValue *GV) |
void | setAliasAttributes (const Decl *D, llvm::GlobalValue *GV) |
void | addReplacement (StringRef Name, llvm::Constant *C) |
void | EmitOMPThreadPrivateDecl (const OMPThreadPrivateDecl *D) |
Emit a code for threadprivate directive. | |
Custom Blocks Runtime Interfaces | |
llvm::Constant * | getNSConcreteGlobalBlock () |
llvm::Constant * | getNSConcreteStackBlock () |
llvm::Constant * | getBlockObjectAssign () |
llvm::Constant * | getBlockObjectDispose () |
Static Public Member Functions | |
static llvm::GlobalValue::VisibilityTypes | GetLLVMVisibility (Visibility V) |
Public Attributes | |
llvm::FoldingSet< ByrefHelpers > | ByrefHelpersCache |
int | GlobalUniqueCount |
This class organizes the cross-function state that is used while generating LLVM code.
Definition at line 258 of file CodeGenModule.h.
CodeGenModule::CodeGenModule | ( | ASTContext & | C, |
const CodeGenOptions & | CodeGenOpts, | ||
llvm::Module & | M, | ||
const llvm::DataLayout & | TD, | ||
DiagnosticsEngine & | Diags, | ||
CoverageSourceInfo * | CoverageInfo = nullptr |
||
) |
Definition at line 76 of file CodeGenModule.cpp.
References clang::serialized_diags::create(), clang::CodeGen::CodeGenTypeCache::DoubleTy, clang::DiagnosticsEngine::Error, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::TargetCodeGenInfo::getABIInfo(), clang::DiagnosticsEngine::getCustomDiagID(), getCXXABI(), getDiags(), clang::TargetInfo::getIntWidth(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::TargetInfo::getPointerAlign(), clang::TargetInfo::getPointerWidth(), clang::ABIInfo::getRuntimeCC(), getTargetCodeGenInfo(), clang::ASTContext::getTargetInfo(), clang::SanitizerSet::has(), clang::CodeGenOptions::InstrProfileInput, 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::IntPtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGenOptions::NoDebugInfo, clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, clang::CodeGen::CodeGenTypeCache::PointerWidthInBits, clang::DiagnosticsEngine::Report(), clang::CodeGen::CodeGenTypeCache::RuntimeCC, clang::LangOptions::Sanitize, clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Definition at line 156 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 914 of file CodeGenModule.cpp.
void clang::CodeGen::CodeGenModule::AddCXXDtorEntry | ( | llvm::Constant * | DtorFn, |
llvm::Constant * | Object | ||
) | [inline] |
Add a destructor and object to add to the C++ global destructor function.
Definition at line 868 of file CodeGenModule.h.
void CodeGenModule::AddDeferredUnusedCoverageMapping | ( | Decl * | D | ) |
Stored a deferred empty coverage mapping for an unused and thus uninstrumented top level declaration.
Definition at line 3278 of file CodeGenModule.cpp.
References clang::Decl::getKind().
Referenced by EmitTopLevelDecl().
void clang::CodeGen::CodeGenModule::addDeferredVTable | ( | const CXXRecordDecl * | RD | ) | [inline] |
Definition at line 1059 of file CodeGenModule.h.
void CodeGenModule::AddDependentLib | ( | StringRef | Lib | ) |
Appends a dependent lib to the "Linker Options" metadata value.
Definition at line 963 of file CodeGenModule.cpp.
References clang::TargetCodeGenInfo::getDependentLibraryOption(), getLLVMContext(), and getTargetCodeGenInfo().
void CodeGenModule::AddDetectMismatch | ( | StringRef | Name, |
StringRef | Value | ||
) |
Appends a detect mismatch command to the linker options.
Definition at line 956 of file CodeGenModule.cpp.
References clang::TargetCodeGenInfo::getDetectMismatchOption(), getLLVMContext(), and getTargetCodeGenInfo().
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 1178 of file CodeGenModule.cpp.
References EmitAnnotateAttr(), clang::Decl::getLocation(), clang::Decl::hasAttr(), and clang::Decl::specific_attrs().
Referenced by clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().
void CodeGenModule::addReplacement | ( | StringRef | Name, |
llvm::Constant * | C | ||
) |
Definition at line 199 of file CodeGenModule.cpp.
References AttributeLangSupport::C.
void CodeGenModule::addUsedGlobal | ( | llvm::GlobalValue * | GV | ) |
Add a global to a list to be added to the llvm.used metadata.
Definition at line 908 of file CodeGenModule.cpp.
Referenced by EmitGlobalDeclMetadata(), emitRuntimeHook(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and SetCommonAttributes().
void CodeGenModule::AppendLinkerOptions | ( | StringRef | Opts | ) |
Appends Opts to the "Linker Options" metadata value.
Definition at line 951 of file CodeGenModule.cpp.
References getLLVMContext().
void CodeGenModule::clear | ( | ) |
Definition at line 320 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 3301 of file CodeGenModule.cpp.
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters().
llvm::Function * CodeGenModule::codegenCXXStructor | ( | const CXXMethodDecl * | MD, |
StructorType | Type | ||
) |
Definition at line 205 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenFunction::GenerateCode(), getAddrOfCXXStructor(), getTypes(), setFunctionDefinitionAttributes(), setFunctionLinkage(), SetLLVMFunctionAttributesForDefinition(), clang::CodeGen::toCXXCtorType(), and clang::CodeGen::toCXXDtorType().
Referenced by emitCXXConstructor(), and emitCXXDestructor().
void CodeGenModule::ConstructAttributeList | ( | const CGFunctionInfo & | Info, |
const Decl * | TargetDecl, | ||
AttributeListType & | PAL, | ||
unsigned & | CallingConv, | ||
bool | AttrOnCallSite | ||
) |
Get the LLVM attributes and calling convention to use for a particular function type.
Info | - The function type information. |
TargetDecl | - The decl these attributes are being constructed for. If supplied the attributes applied to this decl may contribute to the function attributes and calling convention. |
PAL | [out] - On return, the attribute list to use. |
CallingConv | [out] - On return, the LLVM calling convention to use. |
Definition at line 1337 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_end(), clang::CodeGen::CGFunctionInfo::arg_size(), clang::CodeGen::ABIArgInfo::Direct, clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::Type::getAs(), clang::CodeGen::CodeGenTypes::getContext(), clang::CodeGen::CGFunctionInfo::getEffectiveCallingConvention(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), clang::CodeGen::ABIArgInfo::getInReg(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CodeGenTypes::getLLVMContext(), clang::CodeGen::ABIArgInfo::getPaddingInReg(), clang::Type::getPointeeType(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::Decl::hasAttr(), clang::Type::hasSignedIntegerRepresentation(), clang::Type::hasUnsignedIntegerRepresentation(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::Type::isConstantSizeType(), clang::Type::isIncompleteType(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::FunctionProtoType::isNothrow(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedIntegerOrEnumerationType(), and clang::CXXMethodDecl::isVirtual().
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitMustTailThunk(), and SetLLVMFunctionAttributes().
llvm::Function * CodeGenModule::CreateGlobalInitOrDestructFunction | ( | llvm::FunctionType * | ty, |
const Twine & | name, | ||
SourceLocation | Loc = SourceLocation() , |
||
bool | TLS = false |
||
) |
Definition at line 228 of file CGDeclCXX.cpp.
References getLangOpts(), getModule(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), getTarget(), clang::InternalLinkage, and isInSanitizerBlacklist().
Referenced by clang::CodeGen::CodeGenFunction::createAtExitStub(), and clang::CodeGen::CodeGenFunction::generateDestroyHelper().
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 1760 of file CodeGenModule.cpp.
References getModule().
Referenced by clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), and clang::CodeGen::CodeGenVTables::GetAddrOfVTT().
llvm::Constant * CodeGenModule::CreateRuntimeFunction | ( | llvm::FunctionType * | FTy, |
StringRef | Name, | ||
llvm::AttributeSet | ExtraAttrs = llvm::AttributeSet() |
||
) |
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 1642 of file CodeGenModule.cpp.
References AttributeLangSupport::C, and clang::CodeGen::CodeGenTypeCache::getRuntimeCC().
Referenced by createARCRuntimeFunction(), clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), clang::CodeGen::CodeGenFunction::EmitARCIntrinsicUse(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitAtomicLibcall(), clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitFunctionInstrumentation(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), clang::CodeGen::CodeGenFunction::EmitMCountInstrumentation(), emitRTtypeidCall(), getAllocateExceptionFn(), getBadCastFn(), getBadTypeidFn(), getBeginCatchFn(), getBlockObjectAssign(), getBlockObjectDispose(), getCatchallRethrowFn(), getClangCallTerminateFn(), getEndCatchFn(), getFreeExceptionFn(), getGetExceptionPtrFn(), getGuardAbortFn(), getGuardAcquireFn(), getGuardReleaseFn(), getItaniumDynamicCastFn(), getPersonalityFn(), getReThrowFn(), 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 1818 of file CodeGenModule.cpp.
Referenced by emitGlobalDtorWithCXAAtExit(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), GetAddrOfConstantCFString(), and GetAddrOfConstantString().
void CodeGenModule::DecorateInstruction | ( | 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.
Decorate the instruction with a TBAA tag. 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 463 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTBAA::getTBAAScalarTagInfo().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), 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 1160 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 1152 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 1128 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 1144 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 1037 of file CGExprConstant.cpp.
References AttributeLangSupport::C, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantValue(), clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::Expr::getType(), getTypes(), clang::Expr::EvalStatus::HasSideEffects, clang::Type::isReferenceType(), clang::format::Success, and clang::Expr::EvalResult::Val.
Referenced by EmitConstantValue().
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 996 of file CGExprConstant.cpp.
References AttributeLangSupport::C, 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(), and clang::FunctionDecl::isTrivial().
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 1062 of file CGExprConstant.cpp.
References clang::APValue::AddrLabelDiff, clang::APValue::Array, AttributeLangSupport::C, 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(), clang::ArrayType::getElementType(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::APValue::getKind(), clang::ASTContext::getLangOpts(), clang::APValue::getLValueBase(), clang::APValue::getLValueOffset(), clang::CharUnits::getQuantity(), clang::Expr::getType(), getTypes(), clang::ASTContext::getTypeSize(), clang::APValue::getVectorElt(), clang::APValue::getVectorLength(), clang::APValue::hasArrayFiller(), clang::APValue::Int, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::APValue::isInt(), clang::APValue::LValue, clang::APValue::MemberPointer, NULL, clang::APValue::Struct, clang::APValue::Uninitialized, clang::APValue::Union, and clang::APValue::Vector.
Referenced by EmitConstantExpr(), EmitConstantValueForMemory(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), GetAddrOfGlobalTemporary(), and clang::CodeGen::CodeGenFunction::tryEmitAsConstant().
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 1256 of file CGExprConstant.cpp.
References AttributeLangSupport::C, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantValue(), and getTypes().
Referenced by EmitConstantInit(), and EmitConstantValue().
Emit all the deferred coverage mappings for the uninstrumented functions.
Definition at line 3316 of file CodeGenModule.cpp.
References clang::Ctor_Base, clang::Dtor_Base, clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), getFunctionLinkage(), clang::Decl::getKind(), clang::Decl::getLocStart(), and getMangledName().
Referenced by Release().
Emit the RTTI descriptors for the builtin types.
void CodeGenModule::EmitGlobal | ( | GlobalDecl | D | ) |
Emit code for a singal global function or var decl. Forward declarations are emitted lazily.
Definition at line 1291 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::frontend::CPlusPlus, clang::VarDecl::Definition, clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), GetGlobalValue(), getLangOpts(), getMangledName(), getTypes(), clang::Decl::hasAttr(), and clang::ASTContext::isMSStaticDataMemberInlineDefinition().
Referenced by EmitTopLevelDecl().
void CodeGenModule::EmitGlobalAnnotations | ( | ) |
Emit all the global annotations.
Definition at line 1115 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 1381 of file CGExprConstant.cpp.
References clang::Type::castAs(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CGCXXABI::EmitNullMemberPointer(), clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), getCXXABI(), clang::RecordType::getDecl(), clang::ArrayType::getElementType(), clang::MemberPointerType::getPointeeType(), clang::ConstantArrayType::getSize(), getTypes(), clang::Type::isFunctionType(), and clang::Type::isMemberPointerType().
Referenced by EmitConstantInit(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), EmitNullConstant(), EmitNullConstantForBase(), 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 1414 of file CGExprConstant.cpp.
References EmitNullConstant().
Referenced by EmitNullBaseClassInitialization().
void CodeGenModule::EmitOMPThreadPrivateDecl | ( | const OMPThreadPrivateDecl * | D | ) |
Emit a code for threadprivate directive.
D | Threadprivate declaration. |
Definition at line 3539 of file CodeGenModule.cpp.
References clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), GetAddrOfGlobalVar(), getContext(), getOpenMPRuntime(), and clang::OMPThreadPrivateDecl::varlists().
Referenced by EmitTopLevelDecl().
void CodeGenModule::EmitTentativeDefinition | ( | const VarDecl * | D | ) |
Definition at line 1823 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 3107 of file CodeGenModule.cpp.
References AddDeferredUnusedCoverageMapping(), clang::CodeGen::CGDebugInfo::completeTemplateDefinition(), clang::LangOptions::CurrentModule, clang::CodeGen::CGCXXABI::EmitCXXConstructors(), clang::CodeGen::CGCXXABI::EmitCXXDestructors(), EmitGlobal(), EmitOMPThreadPrivateDecl(), clang::CodeGen::CodeGenFunction::GenerateObjCMethod(), getCodeGenOpts(), getContext(), getCXXABI(), clang::Decl::getDeclContext(), clang::Decl::getKind(), getLangOpts(), getModule(), getModuleDebugInfo(), clang::DeclContext::isDependentContext(), clang::CodeGenOptions::LimitedDebugInfo, and clang::TSK_ExplicitInstantiationDefinition.
Referenced by HandleCXXStaticMemberVarInstantiation().
void CodeGenModule::EmitVTable | ( | CXXRecordDecl * | theClass, |
bool | isRequired | ||
) |
This is a callback from Sema to tell us that it believes that a particular v-table is required to be emitted in this translation unit.
The reason we don't simply trust this callback is because Sema will happily report that something is used even when it's used only in code that we don't actually have to emit.
isRequired | - if true, the v-table is mandatory, e.g. because the translation unit defines the key function |
Definition at line 764 of file CGVTables.cpp.
References clang::CodeGen::CodeGenVTables::GenerateClassData().
void CodeGenModule::Error | ( | SourceLocation | loc, |
StringRef | error | ||
) |
Emit a general error that something can't be done.
Definition at line 473 of file CodeGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), getDiags(), clang::ASTContext::getFullLoc(), and clang::DiagnosticsEngine::Report().
Referenced by 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 480 of file CodeGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), getDiags(), clang::ASTContext::getFullLoc(), clang::Stmt::getLocStart(), clang::Stmt::getSourceRange(), and clang::DiagnosticsEngine::Report().
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), AddVariableConstraints(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitLambdaStaticInvokeFunction(), clang::CodeGen::CodeGenFunction::EmitLambdaToBlockPointerBody(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitSEHLeaveStmt(), clang::CodeGen::CodeGenFunction::EmitSEHTryStmt(), 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 490 of file CodeGenModule.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), getDiags(), clang::ASTContext::getFullLoc(), clang::Decl::getLocation(), and clang::DiagnosticsEngine::Report().
llvm::Constant * CodeGenModule::GetAddrOfConstantCFString | ( | const StringLiteral * | Literal | ) |
Return a pointer to a constant CFString object for the given string.
Definition at line 2507 of file CodeGenModule.cpp.
References AttributeLangSupport::C, clang::CodeGen::CodeGenTypes::ConvertType(), CreateRuntimeVariable(), clang::ASTContext::getCFConstantStringType(), GetConstantCFStringEntry(), getContext(), getDataLayout(), getModule(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeAlignInChars(), getTypes(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::IntTy.
llvm::Constant * CodeGenModule::GetAddrOfConstantCompoundLiteral | ( | const CompoundLiteralExpr * | E | ) |
Returns a pointer to a constant global variable for the given file-scope compound literal expression.
Definition at line 1268 of file CGExprConstant.cpp.
References clang::CompoundLiteralExpr::isFileScope().
Referenced by clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue().
llvm::GlobalVariable * CodeGenModule::GetAddrOfConstantCString | ( | const std::string & | Str, |
const char * | GlobalName = nullptr , |
||
unsigned | Alignment = 0 |
||
) |
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). |
GetAddrOfConstantCString - Returns a pointer to a character array containing the literal and a terminating '\0' character. The result has pointer to array type.
Definition at line 2873 of file CodeGenModule.cpp.
References AttributeLangSupport::C, GenerateStringLiteral(), clang::ASTContext::getAlignOfGlobalVarInChars(), getContext(), getLLVMContext(), and clang::CharUnits::getQuantity().
Referenced by buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(), and GetAddrOfConstantStringFromObjCEncode().
llvm::Constant * 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.
Definition at line 2605 of file CodeGenModule.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::ASTContext::buildImplicitRecord(), AttributeLangSupport::C, clang::ASTContext::CharTy, clang::TagDecl::completeDefinition(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::FieldDecl::Create(), CreateRuntimeVariable(), clang::CodeGen::CGObjCRuntime::GetClassGlobal(), GetConstantStringEntry(), getContext(), getLangOpts(), getModule(), getObjCRuntime(), clang::ASTContext::getPointerType(), clang::CharUnits::getQuantity(), clang::ASTContext::getTagDeclType(), clang::ASTContext::getTypeAlignInChars(), getTypes(), clang::ICIS_NoInit, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::IntTy, clang::ASTContext::IntTy, clang::ObjCRuntime::isNonFragile(), clang::LangOptions::ObjCRuntime, clang::Decl::setAccess(), clang::TagDecl::startDefinition(), clang::ASTContext::UnsignedIntTy, and clang::CanQual< T >::withConst().
llvm::GlobalVariable * 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 2814 of file CodeGenModule.cpp.
References AttributeLangSupport::C, GenerateStringLiteral(), clang::ASTContext::getAlignOfGlobalVarInChars(), GetConstantArrayFromStringLiteral(), getContext(), getCXXABI(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::StringLiteral::getStrTokenLoc(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::MangleContext::mangleStringLiteral(), clang::LangOptions::Sanitize, and clang::MangleContext::shouldMangleStringLiteral().
Referenced by clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(), and clang::CodeGen::CodeGenFunction::EmitStringLiteralLValue().
llvm::GlobalVariable * 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 2863 of file CodeGenModule.cpp.
References GetAddrOfConstantCString(), getContext(), clang::ObjCEncodeExpr::getEncodedType(), and clang::ASTContext::getObjCEncodingForType().
Referenced by clang::CodeGen::CodeGenFunction::EmitObjCEncodeExprLValue().
llvm::GlobalValue * CodeGenModule::getAddrOfCXXStructor | ( | const CXXMethodDecl * | MD, |
StructorType | Type, | ||
const CGFunctionInfo * | FnInfo = nullptr , |
||
llvm::FunctionType * | FnType = nullptr , |
||
bool | DontDefer = false |
||
) |
Return the address of the constructor/destructor of the given type.
Definition at line 227 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::GetFunctionType(), GetGlobalValue(), getMangledName(), getTypes(), clang::CodeGen::toCXXCtorType(), and clang::CodeGen::toCXXDtorType().
Referenced by codegenCXXStructor(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), EmitDeclDestroy(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), GetAddrOfGlobal(), and pushTemporaryCleanup().
llvm::Constant * CodeGenModule::GetAddrOfFunction | ( | GlobalDecl | GD, |
llvm::Type * | Ty = 0 , |
||
bool | ForVTable = false , |
||
bool | DontDefer = false |
||
) |
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.
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 (this occurs when we see a definition of the function).
Definition at line 1627 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertType(), clang::GlobalDecl::getDecl(), getMangledName(), and getTypes().
Referenced by clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallee(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), EmitFunctionDeclLValue(), EmitNewDeleteCall(), EmitSizedDeallocationFunction(), clang::CodeGen::CodeGenFunction::GenerateThunk(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), and GetAddrOfGlobal().
llvm::Constant* clang::CodeGen::CodeGenModule::GetAddrOfGlobal | ( | GlobalDecl | GD | ) | [inline] |
Definition at line 668 of file CodeGenModule.h.
References getAddrOfCXXStructor(), GetAddrOfFunction(), GetAddrOfGlobalVar(), clang::GlobalDecl::getCtorType(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::getFromCtorType(), and clang::CodeGen::getFromDtorType().
Referenced by emitConstructorDestructorAlias(), getOrCreateStaticVarDecl(), and TryEmitDefinitionAsAlias().
llvm::Constant * CodeGenModule::GetAddrOfGlobalBlock | ( | const BlockExpr * | BE, |
const char * | name | ||
) |
Gets the address of a block which requires no captures.
Definition at line 1033 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::BlockExpression, buildGlobalBlock(), computeBlockInfo(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::BlockExpr::getBlockDecl(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
llvm::Constant * 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 2907 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitConstantValue(), clang::Expr::EvaluateAsRValue(), clang::ExternalLinkage, getContext(), getCXXABI(), clang::MaterializeTemporaryExpr::getExtendingDecl(), GetGlobalVarAddressSpace(), getLLVMLinkageVarDefinition(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::MaterializeTemporaryExpr::getManglingNumber(), clang::ASTContext::getMaterializedTemporaryValue(), getModule(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::MaterializeTemporaryExpr::GetTemporaryExpr(), clang::Expr::getType(), getTypes(), clang::Expr::EvalStatus::hasSideEffects(), isTypeConstant(), clang::APValue::isUninit(), clang::MangleContext::mangleReferenceTemporary(), clang::SD_Static, clang::SD_Thread, setGlobalVisibility(), setTLSMode(), and clang::Expr::EvalResult::Val.
Referenced by createReferenceTemporary().
llvm::Constant * CodeGenModule::GetAddrOfGlobalVar | ( | const VarDecl * | D, |
llvm::Type * | Ty = nullptr |
||
) |
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 greated with the specified type instead of whatever the normal requested type would be.
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.
Definition at line 1801 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), getContext(), getMangledName(), clang::ValueDecl::getType(), getTypes(), and clang::VarDecl::hasGlobalStorage().
Referenced by EmitGlobalVarDeclLValue(), EmitOMPThreadPrivateDecl(), GetAddrOfGlobal(), and HandleCXXStaticMemberVarInstantiation().
llvm::Constant * CodeGenModule::GetAddrOfRTTIDescriptor | ( | QualType | Ty, |
bool | ForEH = false |
||
) |
Get the address of the RTTI descriptor for the given type.
Definition at line 3524 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::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), 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 35 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(), and clang::ThunkInfo::This.
Referenced by clang::CodeGen::CodeGenVTables::CreateVTableInitializer().
llvm::Constant * CodeGenModule::GetAddrOfUuidDescriptor | ( | const CXXUuidofExpr * | E | ) |
Get the address of a uuid descriptor .
Definition at line 1240 of file CodeGenModule.cpp.
References getModule(), and clang::CXXUuidofExpr::getUuidAsStringRef().
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXUuidofExpr().
ARCEntrypoints& clang::CodeGen::CodeGenModule::getARCEntrypoints | ( | ) | const [inline] |
Definition at line 525 of file CodeGenModule.h.
References getLangOpts().
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(), tryEmitFusedAutoreleaseOfResult(), and tryRemoveRetainOfSelf().
llvm::Constant* clang::CodeGen::CodeGenModule::getAtomicGetterHelperFnMap | ( | QualType | Ty | ) | [inline] |
Definition at line 573 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction().
llvm::Constant* clang::CodeGen::CodeGenModule::getAtomicSetterHelperFnMap | ( | QualType | Ty | ) | [inline] |
Definition at line 565 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 895 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenTypes::ConvertType(), clang::serialized_diags::create(), getContext(), getTypes(), and NULL.
Referenced by buildBlockDescriptor(), getGenericBlockLiteralType(), and initializeForBlockHeader().
StringRef CodeGenModule::getBlockMangledName | ( | GlobalDecl | GD, |
const BlockDecl * | BD | ||
) |
Definition at line 580 of file CodeGenModule.cpp.
References clang::GlobalDecl::getCtorType(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::MangleContext::mangleBlock(), clang::MangleContext::mangleCtorBlock(), clang::MangleContext::mangleDtorBlock(), and clang::MangleContext::mangleGlobalBlock().
Referenced by getStaticDeclName().
llvm::Constant * CodeGenModule::getBlockObjectAssign | ( | ) |
Definition at line 2272 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
llvm::Constant * CodeGenModule::getBlockObjectDispose | ( | ) |
Definition at line 2260 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
llvm::Value * 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 32 of file CGBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, Context, clang::Builtin::Context::GetName(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), and clang::Builtin::Context::isLibFunction().
const CodeGenOptions& clang::CodeGen::CodeGenModule::getCodeGenOpts | ( | ) | const [inline] |
Definition at line 600 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::CodeGen::CodeGenFunction::EmitARCDestroyStrong(), clang::CodeGen::CodeGenFunction::EmitARCInitWeak(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitBlockWithFallThrough(), clang::CodeGen::CodeGenFunction::EmitCaseStmt(), clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitDeclRefExprDbgValue(), clang::CodeGen::CGDebugInfo::EmitExplicitCastType(), clang::CodeGen::CodeGenPGO::emitInitialization(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGDebugInfo::EmitNamespaceAlias(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitRuntimeHook(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), EmitTopLevelDecl(), clang::CodeGen::CodeGenFunction::EmitTrapCheck(), clang::CodeGen::CGDebugInfo::EmitUsingDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDirective(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::getARCCleanupKind(), getCodegenToUse(), getOrInsertRegisterBB(), clang::CodeGen::CodeGenFunction::needsEHCleanup(), Release(), clang::CodeGen::CodeGenFunction::ShouldInstrumentFunction(), clang::CodeGen::CodeGenFunction::shouldUseFusedARCCalls(), shouldUseLifetimeMarkers(), clang::CodeGen::CodeGenFunction::StartFunction(), TryEmitBaseDestructorAsAlias(), TryEmitDefinitionAsAlias(), and tryEmitFMulAdd().
llvm::Constant * CodeGenModule::GetConstantArrayFromStringLiteral | ( | const StringLiteral * | E | ) |
Return a constant array for the given string.
Definition at line 2754 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(), and clang::Type::isPointerType().
Referenced by GetAddrOfConstantStringFromLiteral().
ASTContext& clang::CodeGen::CodeGenModule::getContext | ( | ) | const [inline] |
Definition at line 598 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), buildBlockDescriptor(), buildByrefHelpers(), clang::CodeGen::CodeGenFunction::BuildByRefType(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::CodeGen::CGDebugInfo::completeClassData(), clang::CodeGen::CGDebugInfo::completeRequiredType(), clang::CodeGen::CGDebugInfo::completeTemplateDefinition(), clang::CodeGen::CGDebugInfo::completeType(), computeBlockInfo(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::CodeGen::CreateItaniumCXXABI(), clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), EmitAnnotationLineNo(), EmitAnnotationUnit(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCondBrHints(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CGDebugInfo::EmitLocation(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGCXXABI::EmitMemberPointer(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), EmitOMPThreadPrivateDecl(), EmitTopLevelDecl(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenVTables::EmitVTTDefinition(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), extractFieldType(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateCode(), 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(), GenOpenCLArgMetadata(), GetAddrOfConstantCFString(), GetAddrOfConstantCString(), GetAddrOfConstantString(), GetAddrOfConstantStringFromLiteral(), GetAddrOfConstantStringFromObjCEncode(), GetAddrOfGlobalTemporary(), GetAddrOfGlobalVar(), clang::CodeGen::CodeGenVTables::GetAddrOfVTT(), getAsmSrcLocInfo(), getBlockDescriptorType(), clang::CodeGen::CGCXXABI::getContext(), clang::CodeGen::CodeGenFunction::getContext(), getFunctionLinkage(), GetGlobalVarAddressSpace(), getGuardAcquireFn(), getLLVMLinkageVarDefinition(), getMemberPointerConstant(), GetNonVirtualBaseClassOffset(), getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenVTables::getSecondaryVirtualPointerIndex(), clang::CodeGen::CodeGenVTables::getSubVTTIndex(), GetWeakRefReference(), InitCatchParam(), initializeForBlockHeader(), isInSanitizerBlacklist(), clang::CodeGen::CodeGenVTables::isVTableExternal(), LookupFieldBitOffset(), clang::CodeGen::CGDebugInfo::setLocation(), ShouldUseExternalRTTIDescriptor(), and clang::CodeGen::CodeGenFunction::StartThunk().
CoverageMappingModuleGen* clang::CodeGen::CodeGenModule::getCoverageMapping | ( | ) | const [inline] |
Definition at line 538 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping().
CGCUDARuntime& clang::CodeGen::CodeGenModule::getCUDARuntime | ( | ) | [inline] |
Return a reference to the configured CUDA runtime.
Definition at line 520 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCUDAKernelCallExpr(), and clang::CodeGen::CodeGenFunction::GenerateCode().
CGCXXABI& clang::CodeGen::CodeGenModule::getCXXABI | ( | ) | const [inline] |
Definition at line 608 of file CodeGenModule.h.
Referenced by BuildAppleKextVirtualCall(), CalculateCookiePadding(), clang::CodeGen::CodeGenFunction::CodeGenFunction(), CodeGenModule(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXGuardedInit(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallee(), EmitDeclDestroy(), clang::CodeGen::CodeGenFunction::EmitDelegateCallArg(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitDynamicCastToNull(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), EmitMemberInitializer(), EmitNullConstant(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), EmitTopLevelDecl(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), EmitTypeidFromVTable(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CodeGen::CodeGenVTables::GenerateClassData(), clang::CodeGen::CodeGenFunction::GenerateCode(), 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(), getPolymorphicOffset(), getUniqueTagTypeName(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CodeGen::CodeGenFunction::InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::InitializeVTablePointers(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), PerformReturnAdjustment(), pushTemporaryCleanup(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::CodeGen::CodeGenFunction::StartThunk().
const llvm::DataLayout& clang::CodeGen::CodeGenModule::getDataLayout | ( | ) | const [inline] |
Definition at line 603 of file CodeGenModule.h.
Referenced by CoerceIntOrPtrToIntOrPtr(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EnterStructPointerForCoercedAccess(), GetAddrOfConstantCFString(), and isFullSizeType().
DiagnosticsEngine& clang::CodeGen::CodeGenModule::getDiags | ( | ) | const [inline] |
Definition at line 602 of file CodeGenModule.h.
Referenced by CodeGenModule(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), Error(), ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), and Release().
llvm::GlobalValue::LinkageTypes CodeGenModule::getFunctionLinkage | ( | GlobalDecl | GD | ) |
Definition at line 652 of file CodeGenModule.cpp.
References getContext(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::ASTContext::GetGVALinkageForFunction(), getLLVMLinkageForDeclarator(), clang::GVA_Internal, and clang::InternalLinkage.
Referenced by emitConstructorDestructorAlias(), EmitDeferredUnusedCoverageMappings(), getCodegenToUse(), setFunctionLinkage(), and TryEmitDefinitionAsAlias().
llvm::Type * CodeGenModule::getGenericBlockLiteralType | ( | ) |
The type of a generic block literal.
Definition at line 925 of file CGBlocks.cpp.
References clang::serialized_diags::create(), getBlockDescriptorType(), clang::CodeGen::CodeGenTypeCache::IntTy, NULL, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
llvm::GlobalValue * CodeGenModule::GetGlobalValue | ( | StringRef | Ref | ) |
Definition at line 601 of file CodeGenModule.cpp.
References getModule().
Referenced by emitConstructorDestructorAlias(), EmitGlobal(), EmitTentativeDefinition(), getAddrOfCXXStructor(), GetWeakRefReference(), and TryEmitDefinitionAsAlias().
unsigned CodeGenModule::GetGlobalVarAddressSpace | ( | const VarDecl * | D, |
unsigned | AddrSpace | ||
) |
Return the 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.
Definition at line 1846 of file CodeGenModule.cpp.
References clang::LangAS::cuda_constant, clang::LangAS::cuda_device, clang::LangAS::cuda_shared, getContext(), clang::ASTContext::getTargetAddressSpace(), and clang::Decl::hasAttr().
Referenced by GetAddrOfGlobalTemporary(), and getOrCreateStaticVarDecl().
llvm::Function * CodeGenModule::getIntrinsic | ( | unsigned | IID, |
ArrayRef< llvm::Type * > | Tys = None |
||
) |
Definition at line 2455 of file CodeGenModule.cpp.
References getModule().
Referenced by clang::CodeGen::CallArgList::allocateArgumentMemory(), buildFMulAdd(), EmitAArch64TblBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), emitCatchDispatchBlock(), EmitCXXNewAllocSize(), EmitDeclInvariant(), EmitFAbs(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), emitFPIntBuiltin(), clang::CodeGen::CodeGenFunction::EmitFunctionInstrumentation(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), EmitOverflowIntrinsic(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), emitTernaryFPBuiltin(), clang::CodeGen::CodeGenFunction::EmitTrapCheck(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), emitUnaryFPBuiltin(), clang::CodeGen::CodeGenFunction::EmitVarAnnotations(), clang::CodeGen::CallArgList::freeArgumentMemory(), clang::CodeGen::CodeGenFunction::GenerateCode(), and packTBLDVectorList().
Definition at line 619 of file CodeGenModule.h.
References clang::CodeGen::CodeGenVTables::getItaniumVTableContext().
Referenced by BuildAppleKextVirtualCall().
const LangOptions& clang::CodeGen::CodeGenModule::getLangOpts | ( | ) | const [inline] |
Definition at line 599 of file CodeGenModule.h.
Referenced by buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::CodeGenFunction(), CodeGenModule(), clang::CodeGen::CGDebugInfo::completeType(), computeBlockInfo(), configureBlocksRuntimeObject(), createARCRuntimeFunction(), CreateGlobalInitOrDestructFunction(), clang::CodeGen::CreateGNUObjCRuntime(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), EmitBaseInitializer(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallOrInvoke(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), EmitGlobal(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolCleanup(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), EmitTopLevelDecl(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), GenerateStringLiteral(), GetAddrOfConstantString(), GetAddrOfRTTIDescriptor(), getARCEntrypoints(), getAsmSrcLocInfo(), clang::CodeGen::CodeGenFunction::getInvokeDestImpl(), clang::CodeGen::CodeGenFunction::getLangOpts(), getLLVMLinkageForDeclarator(), getStaticDeclName(), getTerminateFn(), getTypeInfoLinkage(), clang::CodeGen::CodeGenFunction::IvarTypeWithAggrGCObjects(), MaybeHandleStaticInExternC(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), tryCaptureAsConstant(), useClangCallTerminate(), and UseOptimizedSetter().
llvm::LLVMContext& clang::CodeGen::CodeGenModule::getLLVMContext | ( | ) | [inline] |
Definition at line 609 of file CodeGenModule.h.
Referenced by AddDependentLib(), AddDetectMismatch(), addLinkOptionsPostorder(), AppendLinkerOptions(), buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::BuildByRefType(), computeBlockInfo(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenPGO::createBranchWeights(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), EmitAnnotationString(), clang::CodeGen::CodeGenFunction::EmitCall(), EmitGlobalDeclMetadata(), EmitGlobalNamedRegister(), clang::CodeGen::CodeGenPGO::emitInitialization(), clang::CodeGen::CodeGenPGO::emitInstrumentationData(), clang::CodeGen::CGDebugInfo::EmitLocation(), emitRuntimeHook(), clang::CodeGen::CGDebugInfo::finalize(), GetAddrOfConstantCString(), getClangCallTerminateFn(), getGuardAbortFn(), getGuardAcquireFn(), getGuardReleaseFn(), clang::CodeGen::CodeGenFunction::getLLVMContext(), getNoObjCARCExceptionsMetadata(), getOrInsertRegisterBB(), getOrInsertRuntimeRegister(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), and SetLLVMFunctionAttributes().
llvm::Constant * CodeGenModule::getLLVMLifetimeEndFn | ( | ) |
Lazily declare the .lifetime.end intrinsic.
Definition at line 1615 of file CGDecl.cpp.
References getModule().
llvm::Constant * CodeGenModule::getLLVMLifetimeStartFn | ( | ) |
Lazily declare the .lifetime.start intrinsic.
Definition at line 1607 of file CGDecl.cpp.
References getModule().
Referenced by clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca().
llvm::GlobalValue::LinkageTypes CodeGenModule::getLLVMLinkageForDeclarator | ( | const DeclaratorDecl * | D, |
GVALinkage | Linkage, | ||
bool | IsConstantVariable | ||
) |
Returns LLVM linkage for a declarator.
Definition at line 2083 of file CodeGenModule.cpp.
References clang::frontend::CPlusPlus, clang::ExternalLinkage, clang::ASTContext::getLangOpts(), 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 2142 of file CodeGenModule.cpp.
References getContext(), clang::ASTContext::GetGVALinkageForVariable(), and getLLVMLinkageForDeclarator().
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), GetAddrOfGlobalTemporary(), and getThreadLocalWrapperLinkage().
static llvm::GlobalValue::VisibilityTypes clang::CodeGen::CodeGenModule::GetLLVMVisibility | ( | Visibility | V | ) | [inline, static] |
Definition at line 659 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 552 of file CodeGenModule.cpp.
References clang::GlobalDecl::getCanonicalDecl(), clang::GlobalDecl::getCtorType(), getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::IdentifierInfo::getName(), clang::MangleContext::mangleCXXCtor(), clang::MangleContext::mangleCXXDtor(), clang::MangleContext::mangleName(), and clang::MangleContext::shouldMangleDeclName().
Referenced by emitConstructorDestructorAlias(), EmitDeferredUnusedCoverageMappings(), EmitGlobal(), EmitTentativeDefinition(), getAddrOfCXXStructor(), GetAddrOfFunction(), GetAddrOfGlobalVar(), getOrCreateStaticVarDecl(), getStaticDeclName(), and TryEmitDefinitionAsAlias().
llvm::Constant * CodeGenModule::getMemberPointerConstant | ( | const UnaryOperator * | e | ) |
Definition at line 1274 of file CGExprConstant.cpp.
References clang::ast_matchers::decl, clang::CodeGen::CGCXXABI::EmitMemberDataPointer(), clang::CodeGen::CGCXXABI::EmitMemberPointer(), getContext(), getCXXABI(), clang::ASTContext::getFieldOffset(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::ASTContext::toCharUnitsFromBits(), and clang::ast_matchers::type.
Definition at line 623 of file CodeGenModule.h.
References clang::CodeGen::CodeGenVTables::getMicrosoftVTableContext().
llvm::Module& clang::CodeGen::CodeGenModule::getModule | ( | ) | const [inline] |
Definition at line 601 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), buildBlockDescriptor(), buildGlobalBlock(), CreateGlobalInitOrDestructFunction(), CreateOrReplaceCXXRuntimeVariable(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), EmitAnnotationString(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), emitConstructorDestructorAlias(), EmitGlobalAnnotations(), EmitGlobalDeclMetadata(), EmitGlobalNamedRegister(), clang::CodeGen::CodeGenPGO::emitInitialization(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), emitRuntimeHook(), EmitTopLevelDecl(), emitUsed(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), GenerateStringLiteral(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), GetAddrOfConstantCFString(), GetAddrOfConstantString(), GetAddrOfGlobalTemporary(), GetAddrOfUuidDescriptor(), GetGlobalValue(), getIntrinsic(), getLLVMLifetimeEndFn(), getLLVMLifetimeStartFn(), getOrCreateStaticVarDecl(), getOrInsertRegisterBB(), getOrInsertRuntimeRegister(), getRegisterFunc(), getTypeInfoVTable(), Release(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), and TryEmitDefinitionAsAlias().
CGDebugInfo* clang::CodeGen::CodeGenModule::getModuleDebugInfo | ( | ) | [inline] |
Definition at line 588 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 60 of file CGClass.cpp.
References ComputeNonVirtualBaseClassOffset(), clang::CodeGen::CodeGenTypes::ConvertType(), getContext(), clang::CharUnits::getQuantity(), clang::CharUnits::isZero(), and clang::CodeGen::CodeGenTypeCache::PtrDiffTy.
Referenced by clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), and clang::CodeGen::CGCXXABI::getMemberPointerAdjustment().
llvm::MDNode* clang::CodeGen::CodeGenModule::getNoObjCARCExceptionsMetadata | ( | ) | [inline] |
Definition at line 590 of file CodeGenModule.h.
References getLLVMContext().
llvm::Constant * CodeGenModule::getNSConcreteGlobalBlock | ( | ) |
Definition at line 2284 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by buildGlobalBlock().
llvm::Constant * CodeGenModule::getNSConcreteStackBlock | ( | ) |
Definition at line 2295 of file CGBlocks.cpp.
References configureBlocksRuntimeObject(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Retrieve the record type that describes the state of an Objective-C fast enumeration loop (for..in).
Definition at line 2720 of file CodeGenModule.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::ASTContext::buildImplicitRecord(), clang::TagDecl::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().
CGObjCRuntime& clang::CodeGen::CodeGenModule::getObjCRuntime | ( | ) | [inline] |
Return a reference to the configured Objective-C runtime.
Definition at line 499 of file CodeGenModule.h.
Referenced by buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), EmitDeclInit(), clang::CodeGen::CodeGenFunction::EmitIvarOffset(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForIvar(), 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::EmitObjCSelectorLValue(), clang::CodeGen::CodeGenFunction::EmitObjCStringLiteral(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), GetAddrOfConstantString(), and clang::CodeGen::CodeGenFunction::StartObjCMethod().
Return a reference to the configured OpenCL runtime.
Definition at line 508 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), and clang::CodeGen::CodeGenFunction::EmitVarDecl().
Return a reference to the configured OpenMP runtime.
Definition at line 514 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(), clang::CodeGen::EmitOMPNumThreadsClause(), EmitOMPParallelCall(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), EmitOMPThreadPrivateDecl(), EmitThreadPrivateVarDeclLValue(), and clang::CodeGen::CodeGenFunction::~CodeGenFunction().
llvm::Constant * CodeGenModule::getOrCreateStaticVarDecl | ( | const VarDecl & | D, |
llvm::GlobalValue::LinkageTypes | Linkage | ||
) |
Definition at line 170 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Ctor_Base, clang::Dtor_Base, EmitNullConstant(), clang::QualType::getAddressSpace(), GetAddrOfGlobal(), getContext(), clang::GlobalDecl::getDecl(), GetGlobalVarAddressSpace(), getMangledName(), getModule(), clang::Decl::getNonClosureContext(), getStaticDeclName(), clang::ASTContext::getTargetAddressSpace(), getTypes(), clang::QualType::isConstant(), clang::Type::isConstantSizeType(), clang::LangAS::opencl_local, setGlobalVisibility(), setStaticLocalDeclAddress(), and setTLSMode().
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), and clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().
llvm::IndexedInstrProfReader* clang::CodeGen::CodeGenModule::getPGOReader | ( | ) | const [inline] |
Definition at line 536 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters().
InstrProfStats& clang::CodeGen::CodeGenModule::getPGOStats | ( | ) | [inline] |
Definition at line 535 of file CodeGenModule.h.
RREntrypoints& clang::CodeGen::CodeGenModule::getRREntrypoints | ( | ) | const [inline] |
Definition at line 530 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolPop(), and clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolPush().
Definition at line 1055 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and clang::CodeGen::CodeGenFunction::InsertHelper().
llvm::ConstantInt * CodeGenModule::getSize | ( | CharUnits | numChars | ) |
Emit the given number of characters as a value of type size_t.
Definition at line 497 of file CodeGenModule.cpp.
References clang::CharUnits::getQuantity(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), emitPointerArithmetic(), emitStructGetterCall(), and emitStructSetterCall().
llvm::Constant* clang::CodeGen::CodeGenModule::getStaticLocalDeclAddress | ( | const VarDecl * | D | ) | [inline] |
Definition at line 542 of file CodeGenModule.h.
llvm::GlobalVariable* clang::CodeGen::CodeGenModule::getStaticLocalDeclGuardAddress | ( | const VarDecl * | D | ) | [inline] |
Definition at line 554 of file CodeGenModule.h.
const TargetInfo& clang::CodeGen::CodeGenModule::getTarget | ( | ) | const [inline] |
Definition at line 604 of file CodeGenModule.h.
Referenced by BuildAppleKextVirtualCall(), clang::CodeGen::CodeGenFunction::BuildByRefType(), createCXXABI(), CreateGlobalInitOrDestructFunction(), clang::CodeGen::CreateItaniumCXXABI(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CGCXXABI::EmitCtorCompleteObjectHandler(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::EmitCXXTryStmt(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), getCodegenToUse(), getOrInsertRegisterBB(), getTargetCodeGenInfo(), getTriple(), getUniqueTagTypeName(), isMachO(), isThreadWrapperReplaceable(), and useClangCallTerminate().
const TargetCodeGenInfo & CodeGenModule::getTargetCodeGenInfo | ( | ) |
Definition at line 7112 of file CodeGen/TargetInfo.cpp.
References clang::CodeGenOptions::FloatABI, clang::TargetInfo::getABI(), getTarget(), and clang::TargetInfo::getTriple().
Referenced by AddDependentLib(), AddDetectMismatch(), addLinkOptionsPostorder(), arrangeFreeFunctionLikeCall(), CodeGenModule(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitCall(), EmitOMPAlignedClause(), 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 1841 of file CodeGenModule.cpp.
References clang::ASTContext::toCharUnitsFromBits().
llvm::MDNode * CodeGenModule::getTBAAInfo | ( | QualType | QTy | ) |
Definition at line 427 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTBAA::getTBAAInfo().
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
llvm::MDNode * CodeGenModule::getTBAAInfoForVTablePtr | ( | ) |
Definition at line 433 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTBAA::getTBAAInfoForVTablePtr().
Referenced by clang::CodeGen::CodeGenFunction::GetVTablePtr(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointer().
llvm::MDNode * CodeGenModule::getTBAAStructInfo | ( | QualType | QTy | ) |
Definition at line 439 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTBAA::getTBAAStructInfo().
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 451 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTBAA::getTBAAStructTagInfo().
Referenced by clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), and clang::CodeGen::CodeGenFunction::EmitStoreOfScalar().
llvm::MDNode * CodeGenModule::getTBAAStructTypeInfo | ( | QualType | QTy | ) |
Return the MDNode in the type DAG for the given struct type.
Definition at line 445 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo().
const llvm::Triple & CodeGenModule::getTriple | ( | ) | const |
Definition at line 7104 of file CodeGen/TargetInfo.cpp.
References getTarget(), and clang::TargetInfo::getTriple().
Referenced by supportsCOMDAT().
llvm::Constant* clang::CodeGen::CodeGenModule::getTypeDescriptorFromMap | ( | QualType | Ty | ) | [inline] |
Definition at line 581 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor().
CodeGenTypes& clang::CodeGen::CodeGenModule::getTypes | ( | ) | [inline] |
Definition at line 615 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenABITypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenABITypes::arrangeFreeFunctionCall(), clang::CodeGen::CodeGenABITypes::arrangeFreeFunctionType(), clang::CodeGen::CodeGenABITypes::arrangeObjCMessageSendSignature(), clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualDestructorCall(), buildBlockDescriptor(), buildGlobalBlock(), codegenCXXStructor(), computeBlockInfo(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitAtomicLibcall(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), EmitConstantExpr(), EmitConstantInit(), EmitConstantValue(), EmitConstantValueForMemory(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallee(), clang::CodeGen::CodeGenFunction::EmitCXXStructorCall(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitGlobal(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), EmitNewDeleteCall(), EmitNullBaseClassInitialization(), EmitNullConstant(), EmitNullConstant(), EmitNullConstantForBase(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CodeGenFunction::EmitVAArg(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenFunction::GenerateThunk(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), GetAddrOfConstantCFString(), GetAddrOfConstantString(), getAddrOfCXXStructor(), GetAddrOfFunction(), GetAddrOfGlobalTemporary(), GetAddrOfGlobalVar(), GetAddrOfThunk(), getBlockDescriptorType(), clang::CodeGen::CGCXXABI::GetBogusMemberPointer(), GetConstantArrayFromStringLiteral(), getGuardAcquireFn(), clang::CodeGen::CGObjCRuntime::getMessageSendInfo(), getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenFunction::getTypes(), GetWeakRefReference(), initializeForBlockHeader(), clang::CodeGen::CodeGenFunction::StartObjCMethod(), and TryEmitDefinitionAsAlias().
int clang::CodeGen::CodeGenModule::getUniqueBlockCount | ( | ) | [inline] |
Fetches the global unique block count.
Definition at line 763 of file CodeGenModule.h.
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable().
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 v-table for the given class.
Note that we only call this at the end of the translation unit.
Definition at line 680 of file CGVTables.cpp.
References clang::ExternalLinkage, clang::ASTContext::getCurrentKeyFunction(), clang::ASTContext::getLangOpts(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::InternalLinkage, clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isInlined(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by getTypeInfoLinkage().
CodeGenVTables& clang::CodeGen::CodeGenModule::getVTables | ( | ) | [inline] |
Definition at line 617 of file CodeGenModule.h.
Referenced by emitCXXDestructor(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), shouldEmitVTableAtEndOfTranslationUnit(), and ShouldUseExternalRTTIDescriptor().
llvm::Constant * CodeGenModule::GetWeakRefReference | ( | const ValueDecl * | VD | ) |
Get a reference to the target of VD.
Definition at line 1261 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Decl::getAttr(), getContext(), GetGlobalValue(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), and getTypes().
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue().
Tell the consumer that this variable has been instantiated.
Definition at line 2272 of file CodeGenModule.cpp.
References EmitTopLevelDecl(), GetAddrOfGlobalVar(), clang::VarDecl::getDefinition(), clang::VarDecl::getTemplateSpecializationKind(), and clang::TSK_ExplicitInstantiationDefinition.
bool clang::CodeGen::CodeGenModule::hasObjCRuntime | ( | ) | [inline] |
Return true iff an Objective-C runtime has been configured.
Definition at line 505 of file CodeGenModule.h.
bool CodeGenModule::isInSanitizerBlacklist | ( | llvm::Function * | Fn, |
SourceLocation | Loc | ||
) | const |
Definition at line 1186 of file CodeGenModule.cpp.
References getContext(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getMainFileID(), clang::ASTContext::getSanitizerBlacklist(), clang::ASTContext::getSourceManager(), clang::SanitizerBlacklist::isBlacklistedLocation(), clang::SourceLocation::isInvalid(), and SM.
Referenced by CreateGlobalInitOrDestructFunction(), clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), SetLLVMFunctionAttributesForDefinition(), and clang::CodeGen::CodeGenFunction::StartFunction().
bool CodeGenModule::isInSanitizerBlacklist | ( | llvm::GlobalVariable * | GV, |
SourceLocation | Loc, | ||
QualType | Ty, | ||
StringRef | Category = StringRef() |
||
) | const |
Definition at line 1204 of file CodeGenModule.cpp.
References clang::QualType::getAsString(), clang::QualType::getCanonicalType(), getContext(), clang::ASTContext::getSanitizerBlacklist(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::SanitizerSet::has(), clang::QualType::isNull(), clang::Type::isRecordType(), and clang::LangOptions::Sanitize.
Definition at line 623 of file CodeGenTypes.cpp.
References clang::Type::castAs().
bool CodeGenModule::isPaddedAtomicType | ( | const AtomicType * | type | ) |
Definition at line 627 of file CodeGenTypes.cpp.
References clang::ASTContext::getTypeSize(), and clang::AtomicType::getValueType().
bool CodeGenModule::isTypeConstant | ( | QualType | Ty, |
bool | ExcludeCtor | ||
) |
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 1660 of file CodeGenModule.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getLangOpts(), clang::QualType::isConstant(), clang::Type::isReferenceType(), and Record.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), and GetAddrOfGlobalTemporary().
bool CodeGenModule::lookupRepresentativeDecl | ( | StringRef | MangledName, |
GlobalDecl & | Result | ||
) | const |
Definition at line 3402 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 1861 of file CodeGenModule.cpp.
References clang::frontend::CPlusPlus, getLangOpts(), and clang::InternalLinkage.
void CodeGenModule::Release | ( | ) |
Finalize LLVM code generation.
Definition at line 337 of file CodeGenModule.cpp.
References EmitDeferredUnusedCoverageMappings(), EmitGlobalAnnotations(), clang::CodeGen::CodeGenPGO::emitInitialization(), clang::diag::Error, clang::CodeGen::CGDebugInfo::finalize(), getCodeGenOpts(), getDiags(), clang::ASTContext::getLangOpts(), getModule(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getWideCharType(), clang::CodeGen::InstrProfStats::hasDiagnostics(), clang::CodeGen::InstrProfStats::reportDiagnostics(), and clang::diag::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 1164 of file CGCall.cpp.
bool CodeGenModule::ReturnTypeUsesFP2Ret | ( | QualType | ResultType | ) |
Return true iff the given type uses 'fp2ret' when used as a return type.
Definition at line 1186 of file CGCall.cpp.
References clang::Type::getAs(), clang::CodeGen::CodeGenTypes::getTarget(), and clang::TargetInfo::useObjCFP2RetForComplexLongDouble().
bool CodeGenModule::ReturnTypeUsesFPRet | ( | QualType | ResultType | ) |
Return true iff the given type uses 'fpret' when used as a return type.
Definition at line 1169 of file CGCall.cpp.
References clang::TargetInfo::Double, clang::TargetInfo::Float, clang::Type::getAs(), clang::CodeGen::CodeGenTypes::getTarget(), clang::TargetInfo::LongDouble, and clang::TargetInfo::useObjCFPRetForRealType().
bool CodeGenModule::ReturnTypeUsesSRet | ( | const CGFunctionInfo & | FI | ) |
Return true iff the given type uses 'sret' when used as a return type.
Definition at line 1160 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::getReturnInfo(), and clang::CodeGen::ABIArgInfo::isIndirect().
Referenced by clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk().
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 801 of file CodeGenModule.cpp.
References clang::Decl::hasAttr(), and SetCommonAttributes().
Referenced by emitConstructorDestructorAlias(), and TryEmitDefinitionAsAlias().
void clang::CodeGen::CodeGenModule::setAtomicGetterHelperFnMap | ( | QualType | Ty, |
llvm::Constant * | Fn | ||
) | [inline] |
Definition at line 576 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction().
void clang::CodeGen::CodeGenModule::setAtomicSetterHelperFnMap | ( | QualType | Ty, |
llvm::Constant * | Fn | ||
) | [inline] |
Definition at line 568 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 790 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 669 of file CodeGenModule.cpp.
Referenced by codegenCXXStructor().
void clang::CodeGen::CodeGenModule::setFunctionLinkage | ( | GlobalDecl | GD, |
llvm::Function * | F | ||
) | [inline] |
Definition at line 1002 of file CodeGenModule.h.
References getFunctionLinkage().
Referenced by codegenCXXStructor(), and clang::CodeGen::CodeGenFunction::GenerateThunk().
void CodeGenModule::setGlobalVisibility | ( | llvm::GlobalValue * | GV, |
const NamedDecl * | D | ||
) | const |
Set the visibility for the given LLVM GlobalValue.
Definition at line 501 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 821 of file CodeGenModule.cpp.
References clang::InternalLinkage, SetLLVMFunctionAttributes(), and SetLLVMFunctionAttributesForDefinition().
Referenced by clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), 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 674 of file CodeGenModule.cpp.
References ConstructAttributeList(), and getLLVMContext().
Referenced by SetInternalFunctionAttributes().
void CodeGenModule::SetLLVMFunctionAttributesForDefinition | ( | const Decl * | D, |
llvm::Function * | F | ||
) |
Set the LLVM function attributes which only apply to a function definition.
Definition at line 704 of file CodeGenModule.cpp.
References clang::ASTContext::getCharWidth(), clang::Decl::getLocation(), clang::Decl::getMaxAlignment(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), hasUnwindExceptions(), isInSanitizerBlacklist(), clang::LangOptions::Sanitize, clang::LangOptions::SSPOn, clang::LangOptions::SSPReq, and clang::LangOptions::SSPStrong.
Referenced by codegenCXXStructor(), and SetInternalFunctionAttributes().
void clang::CodeGen::CodeGenModule::setStaticLocalDeclAddress | ( | const VarDecl * | D, |
llvm::Constant * | C | ||
) | [inline] |
Definition at line 545 of file CodeGenModule.h.
References AttributeLangSupport::C.
Referenced by clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and getOrCreateStaticVarDecl().
void clang::CodeGen::CodeGenModule::setStaticLocalDeclGuardAddress | ( | const VarDecl * | D, |
llvm::GlobalVariable * | C | ||
) | [inline] |
Definition at line 557 of file CodeGenModule.h.
References AttributeLangSupport::C.
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 538 of file CodeGenModule.cpp.
References clang::Decl::getAttr(), GetLLVMTLSModel(), and clang::VarDecl::getTLSKind().
Referenced by GetAddrOfGlobalTemporary(), and getOrCreateStaticVarDecl().
void clang::CodeGen::CodeGenModule::setTypeDescriptorInMap | ( | QualType | Ty, |
llvm::Constant * | C | ||
) | [inline] |
Definition at line 584 of file CodeGenModule.h.
References AttributeLangSupport::C.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor().
bool clang::CodeGen::CodeGenModule::shouldUseTBAA | ( | ) | const [inline] |
Definition at line 611 of file CodeGenModule.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForField().
bool CodeGenModule::supportsCOMDAT | ( | ) | const |
Definition at line 7108 of file CodeGen/TargetInfo.cpp.
References getTriple().
Try to emit a base destructor as an alias to its primary base-class destructor.
Definition at line 33 of file CGCXX.cpp.
References clang::CodeGen::Base, clang::CXXRecordDecl::bases(), clang::Dtor_Base, 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(), 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.
If we don't have a definition for the destructor yet, don't emit. We can't emit aliases to declarations; that's just not how aliases work.
Definition at line 113 of file CGCXX.cpp.
References clang::serialized_diags::create(), GetAddrOfGlobal(), getCodeGenOpts(), clang::GlobalDecl::getDecl(), getFunctionLinkage(), clang::CodeGen::CodeGenTypes::GetFunctionType(), GetGlobalValue(), getMangledName(), getModule(), getTypes(), clang::Decl::hasAttr(), and setAliasAttributes().
Referenced by emitCXXDestructor(), and TryEmitBaseDestructorAsAlias().
void CodeGenModule::UpdateCompletedType | ( | const TagDecl * | TD | ) |
Definition at line 422 of file CodeGenModule.cpp.
References clang::CodeGen::CodeGenTypes::UpdateCompletedType().
llvm::FoldingSet<ByrefHelpers> clang::CodeGen::CodeGenModule::ByrefHelpersCache |
Definition at line 760 of file CodeGenModule.h.
Referenced by buildByrefHelpers().
Definition at line 467 of file CodeGenModule.h.