14 #ifndef LLVM_CLANG_LIB_CODEGEN_CODEGENMODULE_H 15 #define LLVM_CLANG_LIB_CODEGEN_CODEGENMODULE_H 32 #include "llvm/ADT/DenseMap.h" 33 #include "llvm/ADT/SetVector.h" 34 #include "llvm/ADT/SmallPtrSet.h" 35 #include "llvm/ADT/StringMap.h" 36 #include "llvm/IR/Module.h" 37 #include "llvm/IR/ValueHandle.h" 38 #include "llvm/Transforms/Utils/SanitizerStats.h" 49 class IndexedInstrProfReader;
58 class ObjCImplementationDecl;
59 class ObjCCategoryImplDecl;
60 class ObjCProtocolDecl;
74 class HeaderSearchOptions;
75 class PreprocessorOptions;
76 class DiagnosticsEngine;
78 class CXXDestructorDecl;
80 class CoverageSourceInfo;
85 class CodeGenFunction;
90 class CGOpenCLRuntime;
93 class BlockFieldFlags;
94 class FunctionArgList;
95 class CoverageMappingModuleGen;
96 class TargetCodeGenInfo;
107 : priority(p), lex_order(l) {}
114 return std::tie(priority, lex_order) <
189 uint32_t VisitedInMainFile;
190 uint32_t MissingInMainFile;
197 : VisitedInMainFile(0), MissingInMainFile(0), Visited(0), Missing(0),
237 void Profile(llvm::FoldingSetNodeID &
id)
const {
241 virtual void profileImpl(llvm::FoldingSetNodeID &
id)
const = 0;
258 Structor() : Priority(0), Initializer(nullptr), AssociatedData(nullptr) {}
259 Structor(
int Priority, llvm::Constant *Initializer,
260 llvm::Constant *AssociatedData)
261 : Priority(Priority), Initializer(Initializer),
262 AssociatedData(AssociatedData) {}
276 llvm::Module &TheModule;
279 std::unique_ptr<CGCXXABI> ABI;
280 llvm::LLVMContext &VMContext;
282 std::unique_ptr<CodeGenTBAA> TBAA;
284 mutable std::unique_ptr<TargetCodeGenInfo> TheTargetCodeGenInfo;
295 std::unique_ptr<CGOpenCLRuntime> OpenCLRuntime;
296 std::unique_ptr<CGOpenMPRuntime> OpenMPRuntime;
297 std::unique_ptr<CGCUDARuntime> CUDARuntime;
298 std::unique_ptr<CGDebugInfo> DebugInfo;
299 std::unique_ptr<ObjCEntrypoints> ObjCData;
300 llvm::MDNode *NoObjCARCExceptionsMetadata =
nullptr;
301 std::unique_ptr<llvm::IndexedInstrProfReader> PGOReader;
303 std::unique_ptr<llvm::SanitizerStatReport> SanStats;
308 llvm::SmallPtrSet<llvm::GlobalValue*, 10> WeakRefReferences;
314 std::map<StringRef, GlobalDecl> DeferredDecls;
318 std::vector<GlobalDecl> DeferredDeclsToEmit;
320 DeferredDeclsToEmit.emplace_back(GD);
325 std::vector<GlobalDecl> Aliases;
327 typedef llvm::StringMap<llvm::TrackingVH<llvm::Constant> > ReplacementsTy;
328 ReplacementsTy Replacements;
334 GlobalValReplacements;
342 std::vector<const CXXRecordDecl*> DeferredVTables;
345 std::vector<const CXXRecordDecl *> OpportunisticVTables;
350 std::vector<llvm::WeakTrackingVH> LLVMUsed;
351 std::vector<llvm::WeakTrackingVH> LLVMCompilerUsed;
355 CtorList GlobalCtors;
359 CtorList GlobalDtors;
362 llvm::MapVector<GlobalDecl, StringRef> MangledDeclNames;
363 llvm::StringMap<GlobalDecl, llvm::BumpPtrAllocator> Manglings;
366 std::vector<llvm::Constant*> Annotations;
369 llvm::StringMap<llvm::Constant*> AnnotationStrings;
371 llvm::StringMap<llvm::GlobalVariable *> CFConstantStringMap;
373 llvm::DenseMap<llvm::Constant *, llvm::GlobalVariable *> ConstantStringMap;
374 llvm::DenseMap<const Decl*, llvm::Constant *> StaticLocalDeclMap;
375 llvm::DenseMap<const Decl*, llvm::GlobalVariable*> StaticLocalDeclGuardMap;
376 llvm::DenseMap<const Expr*, llvm::Constant *> MaterializedGlobalTemporaryMap;
378 llvm::DenseMap<QualType, llvm::Constant *> AtomicSetterHelperFnMap;
379 llvm::DenseMap<QualType, llvm::Constant *> AtomicGetterHelperFnMap;
382 llvm::DenseMap<QualType, llvm::Constant *> TypeDescriptorMap;
387 llvm::GlobalValue *> StaticExternCMap;
388 StaticExternCMap StaticExternCValues;
391 std::vector<const VarDecl *> CXXThreadLocals;
395 std::vector<llvm::Function *> CXXThreadLocalInits;
396 std::vector<const VarDecl *> CXXThreadLocalInitVars;
399 std::vector<llvm::Function *> CXXGlobalInits;
406 llvm::DenseMap<const Decl*, unsigned> DelayedCXXInitPosition;
408 typedef std::pair<OrderGlobalInits, llvm::Function*> GlobalInitData;
410 struct GlobalInitPriorityCmp {
411 bool operator()(
const GlobalInitData &LHS,
412 const GlobalInitData &RHS)
const {
413 return LHS.first.priority < RHS.first.priority;
422 std::vector<std::pair<llvm::WeakTrackingVH, llvm::Constant *>> CXXGlobalDtors;
425 llvm::SetVector<clang::Module *> ImportedModules;
429 llvm::SmallPtrSet<clang::Module *, 16> EmittedModuleInitializers;
439 llvm::WeakTrackingVH CFConstantStringClassRef;
443 QualType ObjCFastEnumerationStateType;
448 void createObjCRuntime();
450 void createOpenCLRuntime();
451 void createOpenMPRuntime();
452 void createCUDARuntime();
456 bool shouldOpportunisticallyEmitVTables();
458 llvm::DenseMap<const CompoundLiteralExpr *, llvm::GlobalVariable *>
459 EmittedCompoundLiterals;
463 llvm::DenseMap<const BlockExpr *, llvm::Constant *> EmittedGlobalBlocks;
468 llvm::Constant *NSConcreteGlobalBlock =
nullptr;
469 llvm::Constant *NSConcreteStackBlock =
nullptr;
471 llvm::Constant *BlockObjectAssign =
nullptr;
472 llvm::Constant *BlockObjectDispose =
nullptr;
474 llvm::Type *BlockDescriptorType =
nullptr;
475 llvm::Type *GenericBlockLiteralType =
nullptr;
482 llvm::Constant *LifetimeStartFn =
nullptr;
485 llvm::Constant *LifetimeEndFn =
nullptr;
489 std::unique_ptr<SanitizerMetadata> SanitizerMD;
493 llvm::MapVector<const Decl *, bool> DeferredEmptyCoverageMappingDecls;
495 std::unique_ptr<CoverageMappingModuleGen> CoverageMapping;
500 typedef llvm::DenseMap<QualType, llvm::Metadata *> MetadataTypeMap;
501 MetadataTypeMap MetadataIdMap;
502 MetadataTypeMap GeneralizedMetadataIdMap;
519 bool getExpressionLocationsEnabled()
const;
523 if (!ObjCRuntime) createObjCRuntime();
532 assert(OpenCLRuntime !=
nullptr);
533 return *OpenCLRuntime;
538 assert(OpenMPRuntime !=
nullptr);
539 return *OpenMPRuntime;
544 assert(CUDARuntime !=
nullptr);
549 assert(ObjCData !=
nullptr);
555 llvm::Constant *IsOSVersionAtLeastFn =
nullptr;
558 llvm::IndexedInstrProfReader *
getPGOReader()
const {
return PGOReader.get(); }
561 return CoverageMapping.get();
565 return StaticLocalDeclMap[D];
569 StaticLocalDeclMap[D] = C;
573 getOrCreateStaticVarDecl(
const VarDecl &D,
574 llvm::GlobalValue::LinkageTypes
Linkage);
577 return StaticLocalDeclGuardMap[D];
580 llvm::GlobalVariable *C) {
581 StaticLocalDeclGuardMap[D] = C;
584 bool lookupRepresentativeDecl(StringRef MangledName,
588 return AtomicSetterHelperFnMap[Ty];
591 llvm::Constant *Fn) {
592 AtomicSetterHelperFnMap[Ty] = Fn;
596 return AtomicGetterHelperFnMap[Ty];
599 llvm::Constant *Fn) {
600 AtomicGetterHelperFnMap[Ty] = Fn;
604 return TypeDescriptorMap[Ty];
607 TypeDescriptorMap[Ty] = C;
613 if (!NoObjCARCExceptionsMetadata)
614 NoObjCARCExceptionsMetadata = llvm::MDNode::get(getLLVMContext(), None);
615 return NoObjCARCExceptionsMetadata;
621 const {
return HeaderSearchOpts; }
623 const {
return PreprocessorOpts; }
628 return TheModule.getDataLayout();
632 bool supportsCOMDAT()
const;
633 void maybeSetTrivialComdat(
const Decl &D, llvm::GlobalObject &GO);
659 llvm::MDNode *getTBAATypeInfo(
QualType QTy);
667 TBAAAccessInfo getTBAAVTablePtrAccessInfo(llvm::Type *VTablePtrType);
669 llvm::MDNode *getTBAAStructInfo(
QualType QTy);
673 llvm::MDNode *getTBAABaseTypeInfo(
QualType QTy);
692 return TBAAAccessInfo::getMayAliasInfo();
693 return getTBAAAccessInfo(AccessType);
696 bool isTypeConstant(
QualType QTy,
bool ExcludeCtorDtor);
699 bool isPaddedAtomicType(
const AtomicType *type);
702 void DecorateInstructionWithTBAA(llvm::Instruction *Inst,
706 void DecorateInstructionWithInvariantGroup(llvm::Instruction *I,
710 llvm::ConstantInt *getSize(
CharUnits numChars);
713 void setGlobalVisibility(llvm::GlobalValue *GV,
const NamedDecl *D,
718 void setTLSMode(llvm::GlobalValue *GV,
const VarDecl &D)
const;
726 llvm_unreachable(
"unknown visibility!");
729 llvm::Constant *GetAddrOfGlobal(
GlobalDecl GD,
737 llvm::GlobalVariable *
738 CreateOrReplaceCXXRuntimeVariable(StringRef Name, llvm::Type *Ty,
739 llvm::GlobalValue::LinkageTypes Linkage);
742 CreateGlobalInitOrDestructFunction(llvm::FunctionType *ty,
const Twine &name,
763 llvm::Constant *GetAddrOfGlobalVar(
const VarDecl *D,
764 llvm::Type *Ty =
nullptr,
770 llvm::Constant *GetAddrOfFunction(
GlobalDecl GD, llvm::Type *Ty =
nullptr,
771 bool ForVTable =
false,
772 bool DontDefer =
false,
777 llvm::Constant *GetAddrOfRTTIDescriptor(
QualType Ty,
bool ForEH =
false);
804 computeNonVirtualBaseClassOffset(
const CXXRecordDecl *DerivedClass,
821 llvm::Type *getBlockDescriptorType();
824 llvm::Type *getGenericBlockLiteralType();
827 llvm::Constant *GetAddrOfGlobalBlock(
const BlockExpr *BE, StringRef Name);
832 return EmittedGlobalBlocks.lookup(BE);
837 void setAddrOfGlobalBlock(
const BlockExpr *BE, llvm::Constant *Addr);
848 llvm::Constant *GetConstantArrayFromStringLiteral(
const StringLiteral *E);
853 StringRef Name =
".str");
865 GetAddrOfConstantCString(
const std::string &Str,
866 const char *GlobalName =
nullptr);
874 llvm::GlobalVariable *
880 llvm::GlobalVariable *GV);
889 QualType getObjCFastEnumerationStateType();
901 llvm::FunctionType *FnType =
nullptr,
902 bool DontDefer =
false,
907 llvm::Constant *getBuiltinLibFunction(
const FunctionDecl *FD,
913 void EmitTopLevelDecl(
Decl *D);
917 void AddDeferredUnusedCoverageMapping(
Decl *D);
921 void ClearUnusedCoverageMapping(
const Decl *D);
925 void EmitDeferredUnusedCoverageMappings();
928 void HandleCXXStaticMemberVarInstantiation(
VarDecl *VD);
933 template<
typename SomeDecl>
934 void MaybeHandleStaticInExternC(
const SomeDecl *D, llvm::GlobalValue *GV);
937 void addUsedGlobal(llvm::GlobalValue *GV);
940 void addCompilerUsedGlobal(llvm::GlobalValue *GV);
944 CXXGlobalDtors.emplace_back(DtorFn, Object);
949 CreateRuntimeFunction(llvm::FunctionType *Ty, StringRef Name,
950 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),
955 CreateBuiltinFunction(llvm::FunctionType *Ty, StringRef Name,
956 llvm::AttributeList ExtraAttrs = llvm::AttributeList());
958 llvm::Constant *CreateRuntimeVariable(llvm::Type *Ty,
964 llvm::Constant *getNSConcreteGlobalBlock();
965 llvm::Constant *getNSConcreteStackBlock();
966 llvm::Constant *getBlockObjectAssign();
967 llvm::Constant *getBlockObjectDispose();
971 llvm::Constant *getLLVMLifetimeStartFn();
972 llvm::Constant *getLLVMLifetimeEndFn();
975 void UpdateCompletedType(
const TagDecl *TD);
977 llvm::Constant *getMemberPointerConstant(
const UnaryOperator *e);
997 void ErrorUnsupported(
const Stmt *S,
const char *Type);
1000 void ErrorUnsupported(
const Decl *D,
const char *Type);
1005 void SetInternalFunctionAttributes(
const Decl *D, llvm::Function *F,
1009 void SetLLVMFunctionAttributes(
const Decl *D,
1015 void SetLLVMFunctionAttributesForDefinition(
const Decl *D, llvm::Function *F);
1025 bool ReturnTypeUsesFPRet(
QualType ResultType);
1028 bool ReturnTypeUsesFP2Ret(
QualType ResultType);
1040 void ConstructAttributeList(StringRef Name,
const CGFunctionInfo &Info,
1042 llvm::AttributeList &Attrs,
unsigned &
CallingConv,
1043 bool AttrOnCallSite);
1062 void AddDefaultFnAttrs(llvm::Function &F);
1066 void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
1072 void EmitTentativeDefinition(
const VarDecl *D);
1079 void AppendLinkerOptions(StringRef Opts);
1082 void AddDetectMismatch(StringRef Name, StringRef
Value);
1086 void AddDependentLib(StringRef Lib);
1088 llvm::GlobalVariable::LinkageTypes getFunctionLinkage(
GlobalDecl GD);
1091 F->setLinkage(getFunctionLinkage(GD));
1095 void setFunctionDLLStorageClass(
GlobalDecl GD, llvm::Function *F);
1099 llvm::GlobalVariable::LinkageTypes getVTableLinkage(
const CXXRecordDecl *RD);
1102 CharUnits GetTargetTypeStoreSize(llvm::Type *Ty)
const;
1105 llvm::GlobalValue::LinkageTypes
1107 bool IsConstantVariable);
1110 llvm::GlobalValue::LinkageTypes
1111 getLLVMLinkageVarDefinition(
const VarDecl *VD,
bool IsConstant);
1114 void EmitGlobalAnnotations();
1117 llvm::Constant *EmitAnnotationString(StringRef Str);
1132 llvm::Constant *EmitAnnotateAttr(llvm::GlobalValue *GV,
1133 const AnnotateAttr *AA,
1138 void AddGlobalAnnotations(
const ValueDecl *D, llvm::GlobalValue *GV);
1143 bool isInSanitizerBlacklist(llvm::GlobalVariable *GV,
SourceLocation Loc,
1145 StringRef
Category = StringRef())
const;
1151 StringRef
Category = StringRef())
const;
1154 return SanitizerMD.get();
1158 DeferredVTables.push_back(RD);
1169 void setFunctionDefinitionAttributes(
const FunctionDecl *D,
1172 llvm::GlobalValue *GetGlobalValue(StringRef Ref);
1178 void SetCommonAttributes(
const Decl *D, llvm::GlobalValue *GV);
1184 void setAliasAttributes(
const Decl *D, llvm::GlobalValue *GV);
1186 void addReplacement(StringRef Name, llvm::Constant *C);
1188 void addGlobalValReplacement(llvm::GlobalValue *GV, llvm::Constant *C);
1204 void EmitVTableTypeMetadata(llvm::GlobalVariable *VTable,
1208 llvm::ConstantInt *CreateCrossDsoCfiTypeId(llvm::Metadata *MD);
1213 llvm::Metadata *CreateMetadataIdentifierForType(
QualType T);
1218 llvm::Metadata *CreateMetadataIdentifierGeneralized(
QualType T);
1221 void CreateFunctionTypeMetadata(
const FunctionDecl *FD, llvm::Function *F);
1224 bool NeedAllVtablesTypeId()
const;
1227 void AddVTableTypeMetadata(llvm::GlobalVariable *VTable,
CharUnits Offset,
1231 llvm::Constant *getTerminateFn();
1233 llvm::SanitizerStatReport &getSanStats();
1241 llvm::Constant *getNullPointer(llvm::PointerType *T,
QualType QT);
1244 llvm::Constant *GetOrCreateLLVMFunction(
1245 StringRef MangledName, llvm::Type *Ty,
GlobalDecl D,
bool ForVTable,
1246 bool DontDefer =
false,
bool IsThunk =
false,
1247 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),
1250 llvm::Constant *GetOrCreateLLVMGlobal(StringRef MangledName,
1251 llvm::PointerType *PTy,
1256 void setNonAliasAttributes(
const Decl *D, llvm::GlobalObject *GO);
1259 void SetFunctionAttributes(
GlobalDecl GD, llvm::Function *F,
1260 bool IsIncompleteFunction,
bool IsThunk,
1263 void EmitGlobalDefinition(
GlobalDecl D, llvm::GlobalValue *GV =
nullptr);
1265 void EmitGlobalFunctionDefinition(
GlobalDecl GD, llvm::GlobalValue *GV);
1266 void EmitGlobalVarDefinition(
const VarDecl *D,
bool IsTentative =
false);
1278 void EmitCXXThreadLocalInitFunc();
1281 void EmitCXXGlobalInitFunc();
1284 void EmitCXXGlobalDtorFunc();
1288 void EmitCXXGlobalVarDeclInitFunc(
const VarDecl *D,
1289 llvm::GlobalVariable *Addr,
1292 void EmitPointerToInitFunc(
const VarDecl *VD, llvm::GlobalVariable *Addr,
1293 llvm::Function *InitFunc, InitSegAttr *ISA);
1296 void AddGlobalCtor(llvm::Function *Ctor,
int Priority = 65535,
1297 llvm::Constant *AssociatedData =
nullptr);
1298 void AddGlobalDtor(llvm::Function *Dtor,
int Priority = 65535);
1303 void EmitCtorList(CtorList &Fns,
const char *GlobalName);
1306 void EmitDeferred();
1312 void EmitVTablesOpportunistically();
1315 void applyReplacements();
1318 void applyGlobalValReplacements();
1320 void checkAliases();
1323 void EmitDeferredVTables();
1327 void emitAtAvailableLinkGuard();
1330 void emitLLVMUsed();
1333 void EmitModuleLinkOptions();
1337 void EmitStaticExternCAliases();
1339 void EmitDeclMetadata();
1342 void EmitVersionIdentMetadata();
1345 void EmitTargetMetadata();
1348 void EmitOpenCLMetadata();
1352 void EmitCoverageFile();
1355 llvm::Constant *EmitUuidofInitializer(StringRef uuidstr);
1365 bool MayBeEmittedEagerly(
const ValueDecl *D);
1369 void SimplifyPersonality();
1373 void ConstructDefaultFnAttrList(StringRef Name,
bool HasOptnone,
1374 bool AttrOnCallSite,
1375 llvm::AttrBuilder &FuncAttrs);
1381 #endif // LLVM_CLANG_LIB_CODEGEN_CODEGENMODULE_H const llvm::DataLayout & getDataLayout() const
TBAAAccessInfo getTBAAInfoForSubobject(LValue Base, QualType AccessType)
getTBAAInfoForSubobject - Get TBAA information for an access with a given base lvalue.
CGOpenCLRuntime & getOpenCLRuntime()
Return a reference to the configured OpenCL runtime.
An instance of this class is created to represent a function declaration or definition.
bool operator==(const OrderGlobalInits &RHS) const
void setTypeDescriptorInMap(QualType Ty, llvm::Constant *C)
A (possibly-)qualified type.
CodeGenTypes & getTypes()
llvm::Constant * AssociatedData
const CodeGenOptions & getCodeGenOpts() const
bool hasObjCRuntime()
Return true iff an Objective-C runtime has been configured.
llvm::LLVMContext & getLLVMContext()
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
llvm::Constant * CopyHelper
Stmt - This represents one statement.
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
Implements runtime-specific code generation functions.
Defines the clang::Module class, which describes a module in the source code.
Decl - This represents one declaration (or definition), e.g.
llvm::Constant * objc_autoreleaseReturnValue
id objc_autoreleaseReturnValue(id);
BlockByrefHelpers(CharUnits alignment)
The base class of the type hierarchy.
void setFunctionLinkage(GlobalDecl GD, llvm::Function *F)
Stores additional source code information like skipped ranges which is required by the coverage mappi...
llvm::Constant * objc_loadWeakRetained
id objc_loadWeakRetained(id*);
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...
CtorList & getGlobalCtors()
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
static llvm::GlobalValue::VisibilityTypes GetLLVMVisibility(Visibility V)
const CXXBaseSpecifier *const * path_const_iterator
VarDecl - An instance of this class is created to represent a variable declaration or definition...
Objects with "hidden" visibility are not seen by the dynamic linker.
CompoundLiteralExpr - [C99 6.5.2.5].
CGDebugInfo * getModuleDebugInfo()
LangAS
Defines the address space values used by the address space qualifier of QualType. ...
This class gathers all debug information during compilation and is responsible for emitting to llvm g...
bool shouldUseTBAA() const
DiagnosticsEngine & getDiags() const
llvm::Constant * getAtomicSetterHelperFnMap(QualType Ty)
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have...
llvm::Constant * objc_autorelease
id objc_autorelease(id);
llvm::GlobalVariable * getStaticLocalDeclGuardAddress(const VarDecl *D)
llvm::Constant * objc_copyWeak
void objc_copyWeak(id *dest, id *src);
llvm::Constant * getAtomicGetterHelperFnMap(QualType Ty)
One of these records is kept for each identifier that is lexed.
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
llvm::Constant * objc_loadWeak
id objc_loadWeak(id*);
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
llvm::Constant * objc_retainAutoreleasedReturnValue
id objc_retainAutoreleasedReturnValue(id);
llvm::IndexedInstrProfReader * getPGOReader() const
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
The this pointer adjustment as well as an optional return adjustment for a thunk. ...
Objects with "default" visibility are seen by the dynamic linker and act like normal objects...
CGCUDARuntime & getCUDARuntime()
Return a reference to the configured CUDA runtime.
llvm::Constant * objc_initWeak
id objc_initWeak(id*, id);
bool operator<(const OrderGlobalInits &RHS) const
CharUnits - This is an opaque type for sizes expressed in character units.
Structor(int Priority, llvm::Constant *Initializer, llvm::Constant *AssociatedData)
Visibility
Describes the different kinds of visibility that a declaration may have.
void setStaticLocalDeclAddress(const VarDecl *D, llvm::Constant *C)
Concrete class used by the front-end to report problems and issues.
llvm::Constant * objc_release
void objc_release(id);
llvm::Constant * getAddrOfGlobalBlockIfEmitted(const BlockExpr *BE)
Returns the address of a block which requires no caputres, or null if we've yet to emit the block for...
void addDeferredVTable(const CXXRecordDecl *RD)
void setAtomicGetterHelperFnMap(QualType Ty, llvm::Constant *Fn)
void addMissing(bool MainFile)
Record that a function we've visited has no profile data.
Enums/classes describing ABI related information about constructors, destructors and thunks...
ItaniumVTableContext & getItaniumVTableContext()
const PreprocessorOptions & getPreprocessorOpts() const
void Profile(llvm::FoldingSetNodeID &id) const
Represents a linkage specification.
llvm::Constant * Initializer
InstrProfStats & getPGOStats()
llvm::Constant * getStaticLocalDeclAddress(const VarDecl *D)
llvm::Constant * objc_storeStrong
void objc_storeStrong(id*, id);
Represents a ValueDecl that came out of a declarator.
CtorList & getGlobalDtors()
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
Exposes information about the current target.
CGObjCRuntime & getObjCRuntime()
Return a reference to the configured Objective-C runtime.
CharUnits Alignment
The alignment of the field.
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
Defines the clang::LangOptions interface.
llvm::Constant * objc_autoreleasePoolPop
void objc_autoreleasePoolPop(void*);
const FunctionProtoType * T
llvm::Constant * DisposeHelper
Organizes the cross-function state that is used while generating code coverage mapping data...
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Represents a C++ destructor within a class.
void AddCXXDtorEntry(llvm::Constant *DtorFn, llvm::Constant *Object)
Add a destructor and object to add to the C++ global destructor function.
llvm::Constant * objc_retain
id objc_retain(id);
void setStaticLocalDeclGuardAddress(const VarDecl *D, llvm::GlobalVariable *C)
MicrosoftVTableContext & getMicrosoftVTableContext()
Objects with "protected" visibility are seen by the dynamic linker but always dynamically resolve to ...
void addMismatched(bool MainFile)
Record that a function we've visited has mismatched profile data.
TBAAAccessInfo getTBAAInfo() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
const TargetInfo & getTarget() const
const LangOptions & getLangOpts() const
ASTContext & getContext() const
CallingConv
CallingConv - Specifies the calling convention that a function uses.
GlobalDecl - represents a global declaration.
virtual bool needsCopy() const
void addVisited(bool MainFile)
Record that we've visited a function and whether or not that function was in the main source file...
llvm::Constant * objc_retainBlock
id objc_retainBlock(id);
llvm::Constant * objc_storeWeak
id objc_storeWeak(id*, id);
Encodes a location in the source.
llvm::Constant * getTypeDescriptorFromMap(QualType Ty)
This represents '#pragma omp declare reduction ...' directive.
TagDecl - Represents the declaration of a struct/union/class/enum.
llvm::Constant * objc_autoreleasePoolPush
void *objc_autoreleasePoolPush(void);
Represents a static or instance method of a struct/union/class.
ObjCEntrypoints & getObjCEntrypoints() const
This file defines OpenMP nodes for declarative directives.
llvm::InlineAsm * retainAutoreleasedReturnValueMarker
A void(void) inline asm to use to mark that the return value of a call will be immediately retain...
const HeaderSearchOptions & getHeaderSearchOpts() const
virtual bool needsDispose() const
ItaniumVTableContext & getItaniumVTableContext()
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues, like target-specific attributes, builtins and so on.
std::vector< Structor > CtorList
CGFunctionInfo - Class to encapsulate the information about a function definition.
This class organizes the cross-function state that is used while generating LLVM code.
llvm::Constant * objc_unsafeClaimAutoreleasedReturnValue
id objc_unsafeClaimAutoreleasedReturnValue(id);
CGOpenMPRuntime & getOpenMPRuntime()
Return a reference to the configured OpenMP runtime.
Dataflow Directional Tag Classes.
llvm::FoldingSet< BlockByrefHelpers > ByrefHelpersCache
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
int getUniqueBlockCount()
Fetches the global unique block count.
The basic abstraction for the target Objective-C runtime.
static llvm::Constant * EmitNullConstantForBase(CodeGenModule &CGM, llvm::Type *baseType, const CXXRecordDecl *base)
Emit the null constant for a base subobject.
llvm::Constant * objc_destroyWeak
void objc_destroyWeak(id*);
llvm::Constant * clang_arc_use
void clang.arc.use(...);
CoverageMappingModuleGen * getCoverageMapping() const
llvm::Module & getModule() const
ExplicitCastExpr - An explicit cast written in the source code.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Implements C++ ABI-specific code generation functions.
ObjCEncodeExpr, used for @encode in Objective-C.
This class organizes the cross-module state that is used while lowering AST types to LLVM types...
bool hasDiagnostics()
Whether or not the stats we've gathered indicate any potential problems.
This class records statistics on instrumentation based profiling.
llvm::Constant * objc_retainAutorelease
id objc_retainAutorelease(id);
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
void setAtomicSetterHelperFnMap(QualType Ty, llvm::Constant *Fn)
llvm::MDNode * getNoObjCARCExceptionsMetadata()
llvm::Constant * objc_moveWeak
void objc_moveWeak(id *dest, id *src);
A pair of helper functions for a __block variable.
static llvm::Constant * EmitNullConstant(CodeGenModule &CGM, const RecordDecl *record, bool asCompleteObject)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
MicrosoftVTableContext & getMicrosoftVTableContext()
Represents a C++ struct/union/class.
A specialization of Address that requires the address to be an LLVM Constant.
OrderGlobalInits(unsigned int p, unsigned int l)
StringLiteral - This represents a string literal expression, e.g.
CGCXXABI & getCXXABI() const
GVALinkage
A more specific kind of linkage than enum Linkage.
This structure provides a set of types that are commonly used during IR emission. ...
CodeGenVTables & getVTables()
LValue - This represents an lvalue references.
NamedDecl - This represents a decl with a name.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
SanitizerMetadata * getSanitizerMetadata()
llvm::Constant * objc_retainAutoreleaseReturnValue
id objc_retainAutoreleaseReturnValue(id);
This represents '#pragma omp threadprivate ...' directive.
Abstract information about a function or function prototype.
const llvm::Triple & getTriple() const