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) <
211 uint32_t VisitedInMainFile;
212 uint32_t MissingInMainFile;
219 : VisitedInMainFile(0), MissingInMainFile(0), Visited(0), Missing(0),
259 void Profile(llvm::FoldingSetNodeID &
id)
const {
263 virtual void profileImpl(llvm::FoldingSetNodeID &
id)
const = 0;
280 Structor() : Priority(0), Initializer(nullptr), AssociatedData(nullptr) {}
281 Structor(
int Priority, llvm::Constant *Initializer,
282 llvm::Constant *AssociatedData)
283 : Priority(Priority), Initializer(Initializer),
284 AssociatedData(AssociatedData) {}
298 llvm::Module &TheModule;
301 std::unique_ptr<CGCXXABI> ABI;
302 llvm::LLVMContext &VMContext;
304 std::unique_ptr<CodeGenTBAA> TBAA;
306 mutable std::unique_ptr<TargetCodeGenInfo> TheTargetCodeGenInfo;
317 std::unique_ptr<CGOpenCLRuntime> OpenCLRuntime;
318 std::unique_ptr<CGOpenMPRuntime> OpenMPRuntime;
319 std::unique_ptr<CGCUDARuntime> CUDARuntime;
320 std::unique_ptr<CGDebugInfo> DebugInfo;
321 std::unique_ptr<ObjCEntrypoints> ObjCData;
322 llvm::MDNode *NoObjCARCExceptionsMetadata =
nullptr;
323 std::unique_ptr<llvm::IndexedInstrProfReader> PGOReader;
325 std::unique_ptr<llvm::SanitizerStatReport> SanStats;
330 llvm::SmallPtrSet<llvm::GlobalValue*, 10> WeakRefReferences;
336 std::map<StringRef, GlobalDecl> DeferredDecls;
340 std::vector<GlobalDecl> DeferredDeclsToEmit;
342 DeferredDeclsToEmit.emplace_back(GD);
347 std::vector<GlobalDecl> Aliases;
351 std::vector<GlobalDecl> MultiVersionFuncs;
353 typedef llvm::StringMap<llvm::TrackingVH<llvm::Constant> > ReplacementsTy;
354 ReplacementsTy Replacements;
360 GlobalValReplacements;
368 std::vector<const CXXRecordDecl*> DeferredVTables;
371 std::vector<const CXXRecordDecl *> OpportunisticVTables;
376 std::vector<llvm::WeakTrackingVH> LLVMUsed;
377 std::vector<llvm::WeakTrackingVH> LLVMCompilerUsed;
381 CtorList GlobalCtors;
385 CtorList GlobalDtors;
388 llvm::MapVector<GlobalDecl, StringRef> MangledDeclNames;
389 llvm::StringMap<GlobalDecl, llvm::BumpPtrAllocator> Manglings;
393 llvm::MapVector<std::pair<GlobalDecl, unsigned>, StringRef>
394 CPUSpecificMangledDeclNames;
395 llvm::StringMap<std::pair<GlobalDecl, unsigned>, llvm::BumpPtrAllocator>
396 CPUSpecificManglings;
399 std::vector<llvm::Constant*> Annotations;
402 llvm::StringMap<llvm::Constant*> AnnotationStrings;
404 llvm::StringMap<llvm::GlobalVariable *> CFConstantStringMap;
406 llvm::DenseMap<llvm::Constant *, llvm::GlobalVariable *> ConstantStringMap;
407 llvm::DenseMap<const Decl*, llvm::Constant *> StaticLocalDeclMap;
408 llvm::DenseMap<const Decl*, llvm::GlobalVariable*> StaticLocalDeclGuardMap;
409 llvm::DenseMap<const Expr*, llvm::Constant *> MaterializedGlobalTemporaryMap;
411 llvm::DenseMap<QualType, llvm::Constant *> AtomicSetterHelperFnMap;
412 llvm::DenseMap<QualType, llvm::Constant *> AtomicGetterHelperFnMap;
415 llvm::DenseMap<QualType, llvm::Constant *> TypeDescriptorMap;
420 llvm::GlobalValue *> StaticExternCMap;
421 StaticExternCMap StaticExternCValues;
424 std::vector<const VarDecl *> CXXThreadLocals;
428 std::vector<llvm::Function *> CXXThreadLocalInits;
429 std::vector<const VarDecl *> CXXThreadLocalInitVars;
432 std::vector<llvm::Function *> CXXGlobalInits;
439 llvm::DenseMap<const Decl*, unsigned> DelayedCXXInitPosition;
441 typedef std::pair<OrderGlobalInits, llvm::Function*> GlobalInitData;
443 struct GlobalInitPriorityCmp {
444 bool operator()(
const GlobalInitData &LHS,
445 const GlobalInitData &RHS)
const {
446 return LHS.first.priority < RHS.first.priority;
455 std::vector<std::pair<llvm::WeakTrackingVH, llvm::Constant *>> CXXGlobalDtors;
458 llvm::SetVector<clang::Module *> ImportedModules;
462 llvm::SmallPtrSet<clang::Module *, 16> EmittedModuleInitializers;
472 llvm::WeakTrackingVH CFConstantStringClassRef;
476 QualType ObjCFastEnumerationStateType;
481 void createObjCRuntime();
483 void createOpenCLRuntime();
484 void createOpenMPRuntime();
485 void createCUDARuntime();
489 bool shouldOpportunisticallyEmitVTables();
491 llvm::DenseMap<const CompoundLiteralExpr *, llvm::GlobalVariable *>
492 EmittedCompoundLiterals;
496 llvm::DenseMap<const BlockExpr *, llvm::Constant *> EmittedGlobalBlocks;
501 llvm::Constant *NSConcreteGlobalBlock =
nullptr;
502 llvm::Constant *NSConcreteStackBlock =
nullptr;
504 llvm::Constant *BlockObjectAssign =
nullptr;
505 llvm::Constant *BlockObjectDispose =
nullptr;
507 llvm::Type *BlockDescriptorType =
nullptr;
508 llvm::Type *GenericBlockLiteralType =
nullptr;
515 llvm::Constant *LifetimeStartFn =
nullptr;
518 llvm::Constant *LifetimeEndFn =
nullptr;
522 std::unique_ptr<SanitizerMetadata> SanitizerMD;
526 llvm::MapVector<const Decl *, bool> DeferredEmptyCoverageMappingDecls;
528 std::unique_ptr<CoverageMappingModuleGen> CoverageMapping;
533 typedef llvm::DenseMap<QualType, llvm::Metadata *> MetadataTypeMap;
534 MetadataTypeMap MetadataIdMap;
535 MetadataTypeMap VirtualMetadataIdMap;
536 MetadataTypeMap GeneralizedMetadataIdMap;
553 bool getExpressionLocationsEnabled()
const;
557 if (!ObjCRuntime) createObjCRuntime();
566 assert(OpenCLRuntime !=
nullptr);
567 return *OpenCLRuntime;
572 assert(OpenMPRuntime !=
nullptr);
573 return *OpenMPRuntime;
578 assert(CUDARuntime !=
nullptr);
583 assert(ObjCData !=
nullptr);
589 llvm::Constant *IsOSVersionAtLeastFn =
nullptr;
592 llvm::IndexedInstrProfReader *
getPGOReader()
const {
return PGOReader.get(); }
595 return CoverageMapping.get();
599 return StaticLocalDeclMap[D];
603 StaticLocalDeclMap[D] = C;
607 getOrCreateStaticVarDecl(
const VarDecl &D,
608 llvm::GlobalValue::LinkageTypes
Linkage);
611 return StaticLocalDeclGuardMap[D];
614 llvm::GlobalVariable *C) {
615 StaticLocalDeclGuardMap[D] = C;
618 bool lookupRepresentativeDecl(StringRef MangledName,
622 return AtomicSetterHelperFnMap[Ty];
625 llvm::Constant *Fn) {
626 AtomicSetterHelperFnMap[Ty] = Fn;
630 return AtomicGetterHelperFnMap[Ty];
633 llvm::Constant *Fn) {
634 AtomicGetterHelperFnMap[Ty] = Fn;
638 return TypeDescriptorMap[Ty];
641 TypeDescriptorMap[Ty] = C;
647 if (!NoObjCARCExceptionsMetadata)
648 NoObjCARCExceptionsMetadata = llvm::MDNode::get(getLLVMContext(), None);
649 return NoObjCARCExceptionsMetadata;
655 const {
return HeaderSearchOpts; }
657 const {
return PreprocessorOpts; }
662 return TheModule.getDataLayout();
666 bool supportsCOMDAT()
const;
667 void maybeSetTrivialComdat(
const Decl &D, llvm::GlobalObject &GO);
693 llvm::MDNode *getTBAATypeInfo(
QualType QTy);
701 TBAAAccessInfo getTBAAVTablePtrAccessInfo(llvm::Type *VTablePtrType);
703 llvm::MDNode *getTBAAStructInfo(
QualType QTy);
707 llvm::MDNode *getTBAABaseTypeInfo(
QualType QTy);
731 return TBAAAccessInfo::getMayAliasInfo();
732 return getTBAAAccessInfo(AccessType);
735 bool isTypeConstant(
QualType QTy,
bool ExcludeCtorDtor);
738 bool isPaddedAtomicType(
const AtomicType *type);
741 void DecorateInstructionWithTBAA(llvm::Instruction *Inst,
745 void DecorateInstructionWithInvariantGroup(llvm::Instruction *I,
749 llvm::ConstantInt *getSize(
CharUnits numChars);
752 void setGlobalVisibility(llvm::GlobalValue *GV,
const NamedDecl *D)
const;
754 void setGlobalVisibilityAndLocal(llvm::GlobalValue *GV,
757 void setDSOLocal(llvm::GlobalValue *GV)
const;
759 void setDLLImportDLLExport(llvm::GlobalValue *GV,
GlobalDecl D)
const;
760 void setDLLImportDLLExport(llvm::GlobalValue *GV,
const NamedDecl *D)
const;
763 void setGVProperties(llvm::GlobalValue *GV,
GlobalDecl GD)
const;
764 void setGVProperties(llvm::GlobalValue *GV,
const NamedDecl *D)
const;
768 void setTLSMode(llvm::GlobalValue *GV,
const VarDecl &D)
const;
776 llvm_unreachable(
"unknown visibility!");
779 llvm::Constant *GetAddrOfGlobal(
GlobalDecl GD,
787 llvm::GlobalVariable *
788 CreateOrReplaceCXXRuntimeVariable(StringRef Name, llvm::Type *Ty,
789 llvm::GlobalValue::LinkageTypes Linkage,
793 CreateGlobalInitOrDestructFunction(llvm::FunctionType *ty,
const Twine &name,
814 llvm::Constant *GetAddrOfGlobalVar(
const VarDecl *D,
815 llvm::Type *Ty =
nullptr,
824 LangAS getStringLiteralAddressSpace()
const;
828 llvm::Constant *GetAddrOfFunction(
GlobalDecl GD, llvm::Type *Ty =
nullptr,
829 bool ForVTable =
false,
830 bool DontDefer =
false,
835 llvm::Constant *GetAddrOfRTTIDescriptor(
QualType Ty,
bool ForEH =
false);
841 llvm::Constant *GetAddrOfThunk(StringRef Name, llvm::Type *FnTy,
863 computeNonVirtualBaseClassOffset(
const CXXRecordDecl *DerivedClass,
880 llvm::Type *getBlockDescriptorType();
883 llvm::Type *getGenericBlockLiteralType();
886 llvm::Constant *GetAddrOfGlobalBlock(
const BlockExpr *BE, StringRef Name);
891 return EmittedGlobalBlocks.lookup(BE);
896 void setAddrOfGlobalBlock(
const BlockExpr *BE, llvm::Constant *Addr);
907 llvm::Constant *GetConstantArrayFromStringLiteral(
const StringLiteral *E);
912 StringRef Name =
".str");
924 GetAddrOfConstantCString(
const std::string &Str,
925 const char *GlobalName =
nullptr);
933 llvm::GlobalVariable *
939 llvm::GlobalVariable *GV);
948 QualType getObjCFastEnumerationStateType();
960 llvm::FunctionType *FnType =
nullptr,
961 bool DontDefer =
false,
966 llvm::Constant *getBuiltinLibFunction(
const FunctionDecl *FD,
972 void EmitTopLevelDecl(
Decl *D);
976 void AddDeferredUnusedCoverageMapping(
Decl *D);
980 void ClearUnusedCoverageMapping(
const Decl *D);
984 void EmitDeferredUnusedCoverageMappings();
987 void HandleCXXStaticMemberVarInstantiation(
VarDecl *VD);
992 template<
typename SomeDecl>
993 void MaybeHandleStaticInExternC(
const SomeDecl *D, llvm::GlobalValue *GV);
996 void addUsedGlobal(llvm::GlobalValue *GV);
999 void addCompilerUsedGlobal(llvm::GlobalValue *GV);
1003 CXXGlobalDtors.emplace_back(DtorFn, Object);
1008 CreateRuntimeFunction(llvm::FunctionType *Ty, StringRef Name,
1009 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),
1010 bool Local =
false);
1014 CreateBuiltinFunction(llvm::FunctionType *Ty, StringRef Name,
1015 llvm::AttributeList ExtraAttrs = llvm::AttributeList());
1017 llvm::Constant *CreateRuntimeVariable(llvm::Type *Ty,
1023 llvm::Constant *getNSConcreteGlobalBlock();
1024 llvm::Constant *getNSConcreteStackBlock();
1025 llvm::Constant *getBlockObjectAssign();
1026 llvm::Constant *getBlockObjectDispose();
1030 llvm::Constant *getLLVMLifetimeStartFn();
1031 llvm::Constant *getLLVMLifetimeEndFn();
1034 void UpdateCompletedType(
const TagDecl *TD);
1036 llvm::Constant *getMemberPointerConstant(
const UnaryOperator *e);
1056 void ErrorUnsupported(
const Stmt *S,
const char *Type);
1059 void ErrorUnsupported(
const Decl *D,
const char *Type);
1064 void SetInternalFunctionAttributes(
GlobalDecl GD, llvm::Function *F,
1073 void SetLLVMFunctionAttributesForDefinition(
const Decl *D, llvm::Function *F);
1083 bool ReturnTypeUsesFPRet(
QualType ResultType);
1086 bool ReturnTypeUsesFP2Ret(
QualType ResultType);
1098 void ConstructAttributeList(StringRef Name,
const CGFunctionInfo &Info,
1100 llvm::AttributeList &Attrs,
unsigned &
CallingConv,
1101 bool AttrOnCallSite);
1120 void AddDefaultFnAttrs(llvm::Function &F);
1124 TargetAttr::ParsedTargetAttr filterFunctionTargetAttrs(
const TargetAttr *TD);
1128 void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
GlobalDecl GD);
1133 void EmitTentativeDefinition(
const VarDecl *D);
1140 void AppendLinkerOptions(StringRef Opts);
1143 void AddDetectMismatch(StringRef Name, StringRef
Value);
1147 void AddDependentLib(StringRef Lib);
1149 void AddELFLibDirective(StringRef Lib);
1151 llvm::GlobalVariable::LinkageTypes getFunctionLinkage(
GlobalDecl GD);
1154 F->setLinkage(getFunctionLinkage(GD));
1159 llvm::GlobalVariable::LinkageTypes getVTableLinkage(
const CXXRecordDecl *RD);
1162 CharUnits GetTargetTypeStoreSize(llvm::Type *Ty)
const;
1165 llvm::GlobalValue::LinkageTypes
1167 bool IsConstantVariable);
1170 llvm::GlobalValue::LinkageTypes
1171 getLLVMLinkageVarDefinition(
const VarDecl *VD,
bool IsConstant);
1174 void EmitGlobalAnnotations();
1177 llvm::Constant *EmitAnnotationString(StringRef Str);
1192 llvm::Constant *EmitAnnotateAttr(llvm::GlobalValue *GV,
1193 const AnnotateAttr *AA,
1198 void AddGlobalAnnotations(
const ValueDecl *D, llvm::GlobalValue *GV);
1203 bool isInSanitizerBlacklist(llvm::GlobalVariable *GV,
SourceLocation Loc,
1205 StringRef
Category = StringRef())
const;
1211 StringRef
Category = StringRef())
const;
1214 return SanitizerMD.get();
1218 DeferredVTables.push_back(RD);
1227 llvm::GlobalValue *GetGlobalValue(StringRef Ref);
1233 void SetCommonAttributes(
GlobalDecl GD, llvm::GlobalValue *GV);
1235 void addReplacement(StringRef Name, llvm::Constant *C);
1237 void addGlobalValReplacement(llvm::GlobalValue *GV, llvm::Constant *C);
1257 void EmitVTableTypeMetadata(llvm::GlobalVariable *VTable,
1261 llvm::ConstantInt *CreateCrossDsoCfiTypeId(llvm::Metadata *MD);
1266 llvm::Metadata *CreateMetadataIdentifierForType(
QualType T);
1270 llvm::Metadata *CreateMetadataIdentifierForVirtualMemPtrType(
QualType T);
1275 llvm::Metadata *CreateMetadataIdentifierGeneralized(
QualType T);
1278 void CreateFunctionTypeMetadataForIcall(
const FunctionDecl *FD,
1282 bool NeedAllVtablesTypeId()
const;
1285 void AddVTableTypeMetadata(llvm::GlobalVariable *VTable,
CharUnits Offset,
1293 std::vector<const CXXRecordDecl *>
1297 llvm::Constant *getTerminateFn();
1299 llvm::SanitizerStatReport &getSanStats();
1307 llvm::Constant *getNullPointer(llvm::PointerType *T,
QualType QT);
1310 llvm::Constant *GetOrCreateLLVMFunction(
1311 StringRef MangledName, llvm::Type *Ty,
GlobalDecl D,
bool ForVTable,
1312 bool DontDefer =
false,
bool IsThunk =
false,
1313 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),
1316 llvm::Constant *GetOrCreateMultiVersionResolver(
GlobalDecl GD,
1321 llvm::Constant *GetOrCreateLLVMGlobal(StringRef MangledName,
1322 llvm::PointerType *PTy,
1327 bool GetCPUAndFeaturesAttributes(
GlobalDecl GD,
1328 llvm::AttrBuilder &AttrBuilder);
1329 void setNonAliasAttributes(
GlobalDecl GD, llvm::GlobalObject *GO);
1332 void SetFunctionAttributes(
GlobalDecl GD, llvm::Function *F,
1333 bool IsIncompleteFunction,
bool IsThunk);
1335 void EmitGlobalDefinition(
GlobalDecl D, llvm::GlobalValue *GV =
nullptr);
1337 void EmitGlobalFunctionDefinition(
GlobalDecl GD, llvm::GlobalValue *GV);
1338 void EmitMultiVersionFunctionDefinition(
GlobalDecl GD, llvm::GlobalValue *GV);
1340 void EmitGlobalVarDefinition(
const VarDecl *D,
bool IsTentative =
false);
1343 void emitCPUDispatchDefinition(
GlobalDecl GD);
1353 void EmitCXXThreadLocalInitFunc();
1356 void EmitCXXGlobalInitFunc();
1359 void EmitCXXGlobalDtorFunc();
1363 void EmitCXXGlobalVarDeclInitFunc(
const VarDecl *D,
1364 llvm::GlobalVariable *Addr,
1367 void EmitPointerToInitFunc(
const VarDecl *VD, llvm::GlobalVariable *Addr,
1368 llvm::Function *InitFunc, InitSegAttr *ISA);
1371 void AddGlobalCtor(llvm::Function *Ctor,
int Priority = 65535,
1372 llvm::Constant *AssociatedData =
nullptr);
1373 void AddGlobalDtor(llvm::Function *Dtor,
int Priority = 65535);
1378 void EmitCtorList(CtorList &Fns,
const char *GlobalName);
1381 void EmitDeferred();
1387 void EmitVTablesOpportunistically();
1390 void applyReplacements();
1393 void applyGlobalValReplacements();
1395 void checkAliases();
1397 std::map<int, llvm::TinyPtrVector<llvm::Function *>> DtorsUsingAtExit;
1401 void registerGlobalDtorsWithAtExit();
1403 void emitMultiVersionFunctions();
1406 void EmitDeferredVTables();
1410 void emitAtAvailableLinkGuard();
1413 void emitLLVMUsed();
1416 void EmitModuleLinkOptions();
1420 void EmitStaticExternCAliases();
1422 void EmitDeclMetadata();
1425 void EmitVersionIdentMetadata();
1428 void EmitCommandLineMetadata();
1431 void EmitTargetMetadata();
1434 void EmitOpenCLMetadata();
1438 void EmitCoverageFile();
1441 llvm::Constant *EmitUuidofInitializer(StringRef uuidstr);
1451 bool MayBeEmittedEagerly(
const ValueDecl *D);
1455 void SimplifyPersonality();
1459 void ConstructDefaultFnAttrList(StringRef Name,
bool HasOptnone,
1460 bool AttrOnCallSite,
1461 llvm::AttrBuilder &FuncAttrs);
1463 llvm::Metadata *CreateMetadataIdentifierImpl(
QualType T, MetadataTypeMap &Map,
1470 #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.
Represents 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);
llvm::Constant * objc_autoreleasePoolPopInvoke
void objc_autoreleasePoolPop(void*); Note this method is used when we are using exception handling ...
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 ...
constexpr XRayInstrMask Function
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
llvm::Constant * objc_allocWithZone
void objc_allocWithZone(id);
Represents 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...
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()
__DEVICE__ void * memset(void *__a, int __b, size_t __c)
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.
This represents '#pragma omp requires...' directive.
Exposes information about the current target.
CGObjCRuntime & getObjCRuntime()
Return a reference to the configured Objective-C runtime.
CharUnits Alignment
The alignment of the field.
Pepresents a block literal declaration, which is like an unnamed FunctionDecl.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
This represents one expression.
Defines the clang::LangOptions interface.
llvm::Constant * objc_autoreleasePoolPop
void objc_autoreleasePoolPop(void*);
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);
llvm::Constant * objc_releaseRuntimeFunction
void objc_release(id); Note this is the runtime method not the intrinsic.
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.
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
llvm::Constant * objc_alloc
void objc_alloc(id);
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.
llvm::Constant * objc_autoreleaseRuntimeFunction
id objc_autorelease(id); Note this is the runtime method not the intrinsic.
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. ...
llvm::Constant * objc_retainRuntimeFunction
id objc_retain(id); Note this is the runtime method not the intrinsic.
CodeGenVTables & getVTables()
LValue - This represents an lvalue references.
This represents a decl that may have 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