Lines Matching refs:llvm
37 namespace llvm {
111 llvm::Type *VoidTy;
114 llvm::IntegerType *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty;
116 llvm::Type *FloatTy, *DoubleTy;
119 llvm::IntegerType *IntTy;
123 llvm::IntegerType *IntPtrTy;
124 llvm::IntegerType *SizeTy;
125 llvm::IntegerType *PtrDiffTy;
130 llvm::PointerType *VoidPtrTy;
131 llvm::PointerType *Int8PtrTy;
136 llvm::PointerType *VoidPtrPtrTy;
137 llvm::PointerType *Int8PtrPtrTy;
151 llvm::CallingConv::ID RuntimeCC;
152 llvm::CallingConv::ID getRuntimeCC() const { return RuntimeCC; } in getRuntimeCC()
153 llvm::CallingConv::ID BuiltinCC;
154 llvm::CallingConv::ID getBuiltinCC() const { return BuiltinCC; } in getBuiltinCC()
160 llvm::Constant *objc_autoreleasePoolPop;
163 llvm::Constant *objc_autoreleasePoolPush;
170 llvm::Constant *objc_autorelease;
173 llvm::Constant *objc_autoreleaseReturnValue;
176 llvm::Constant *objc_copyWeak;
179 llvm::Constant *objc_destroyWeak;
182 llvm::Constant *objc_initWeak;
185 llvm::Constant *objc_loadWeak;
188 llvm::Constant *objc_loadWeakRetained;
191 llvm::Constant *objc_moveWeak;
194 llvm::Constant *objc_retain;
197 llvm::Constant *objc_retainAutorelease;
200 llvm::Constant *objc_retainAutoreleaseReturnValue;
203 llvm::Constant *objc_retainAutoreleasedReturnValue;
206 llvm::Constant *objc_retainBlock;
209 llvm::Constant *objc_release;
212 llvm::Constant *objc_storeStrong;
215 llvm::Constant *objc_storeWeak;
219 llvm::InlineAsm *retainAutoreleasedReturnValueMarker;
222 llvm::Constant *clang_arc_use;
267 Structor(int Priority, llvm::Constant *Initializer, in Structor()
268 llvm::Constant *AssociatedData) in Structor()
272 llvm::Constant *Initializer;
273 llvm::Constant *AssociatedData;
282 llvm::Module &TheModule;
284 const llvm::DataLayout &TheDataLayout;
287 llvm::LLVMContext &VMContext;
307 llvm::MDNode *NoObjCARCExceptionsMetadata;
309 std::unique_ptr<llvm::IndexedInstrProfReader> PGOReader;
315 llvm::SmallPtrSet<llvm::GlobalValue*, 10> WeakRefReferences;
326 DeferredGlobal(llvm::GlobalValue *GV, GlobalDecl GD) : GV(GV), GD(GD) {} in DeferredGlobal()
327 llvm::TrackingVH<llvm::GlobalValue> GV;
331 void addDeferredDeclToEmit(llvm::GlobalValue *GV, GlobalDecl GD) { in addDeferredDeclToEmit()
339 typedef llvm::StringMap<llvm::TrackingVH<llvm::Constant> > ReplacementsTy;
348 std::vector<llvm::WeakVH> LLVMUsed;
349 std::vector<llvm::WeakVH> LLVMCompilerUsed;
360 llvm::MapVector<GlobalDecl, StringRef> MangledDeclNames;
361 llvm::StringMap<GlobalDecl, llvm::BumpPtrAllocator> Manglings;
364 std::vector<llvm::Constant*> Annotations;
367 llvm::StringMap<llvm::Constant*> AnnotationStrings;
369 llvm::StringMap<llvm::GlobalVariable *> CFConstantStringMap;
371 llvm::DenseMap<llvm::Constant *, llvm::GlobalVariable *> ConstantStringMap;
372 llvm::DenseMap<const Decl*, llvm::Constant *> StaticLocalDeclMap;
373 llvm::DenseMap<const Decl*, llvm::GlobalVariable*> StaticLocalDeclGuardMap;
374 llvm::DenseMap<const Expr*, llvm::Constant *> MaterializedGlobalTemporaryMap;
376 llvm::DenseMap<QualType, llvm::Constant *> AtomicSetterHelperFnMap;
377 llvm::DenseMap<QualType, llvm::Constant *> AtomicGetterHelperFnMap;
380 llvm::DenseMap<QualType, llvm::Constant *> TypeDescriptorMap;
384 typedef llvm::MapVector<IdentifierInfo *,
385 llvm::GlobalValue *> StaticExternCMap;
389 std::vector<std::pair<const VarDecl *, llvm::GlobalVariable *> >
394 std::vector<llvm::Function *> CXXThreadLocalInits;
395 std::vector<llvm::GlobalVariable *> CXXThreadLocalInitVars;
398 std::vector<llvm::Function *> CXXGlobalInits;
405 llvm::DenseMap<const Decl*, unsigned> DelayedCXXInitPosition;
407 typedef std::pair<OrderGlobalInits, llvm::Function*> GlobalInitData;
421 std::vector<std::pair<llvm::WeakVH,llvm::Constant*> > CXXGlobalDtors;
424 llvm::SetVector<clang::Module *> ImportedModules;
427 SmallVector<llvm::Metadata *, 16> LinkerOptionsMetadata;
434 llvm::WeakVH CFConstantStringClassRef;
438 llvm::WeakVH ConstantStringClassRef;
441 llvm::StructType *NSConstantStringType;
462 llvm::Constant *NSConcreteGlobalBlock;
463 llvm::Constant *NSConcreteStackBlock;
465 llvm::Constant *BlockObjectAssign;
466 llvm::Constant *BlockObjectDispose;
468 llvm::Type *BlockDescriptorType;
469 llvm::Type *GenericBlockLiteralType;
476 llvm::Constant *LifetimeStartFn;
479 llvm::Constant *LifetimeEndFn;
487 llvm::DenseMap<const Decl *, bool> DeferredEmptyCoverageMappingDecls;
492 llvm::Module &M, const llvm::DataLayout &TD,
541 llvm::IndexedInstrProfReader *getPGOReader() const { return PGOReader.get(); } in getPGOReader()
547 llvm::Constant *getStaticLocalDeclAddress(const VarDecl *D) { in getStaticLocalDeclAddress()
551 llvm::Constant *C) { in setStaticLocalDeclAddress()
555 llvm::Constant *
557 llvm::GlobalValue::LinkageTypes Linkage);
559 llvm::GlobalVariable *getStaticLocalDeclGuardAddress(const VarDecl *D) { in getStaticLocalDeclGuardAddress()
563 llvm::GlobalVariable *C) { in setStaticLocalDeclGuardAddress()
570 llvm::Constant *getAtomicSetterHelperFnMap(QualType Ty) { in getAtomicSetterHelperFnMap()
574 llvm::Constant *Fn) { in setAtomicSetterHelperFnMap()
578 llvm::Constant *getAtomicGetterHelperFnMap(QualType Ty) { in getAtomicGetterHelperFnMap()
582 llvm::Constant *Fn) { in setAtomicGetterHelperFnMap()
586 llvm::Constant *getTypeDescriptorFromMap(QualType Ty) { in getTypeDescriptorFromMap()
589 void setTypeDescriptorInMap(QualType Ty, llvm::Constant *C) { in setTypeDescriptorInMap()
595 llvm::MDNode *getNoObjCARCExceptionsMetadata() { in getNoObjCARCExceptionsMetadata()
597 NoObjCARCExceptionsMetadata = llvm::MDNode::get(getLLVMContext(), None); in getNoObjCARCExceptionsMetadata()
604 llvm::Module &getModule() const { return TheModule; } in getModule()
606 const llvm::DataLayout &getDataLayout() const { return TheDataLayout; } in getDataLayout()
608 const llvm::Triple &getTriple() const;
610 void maybeSetTrivialComdat(const Decl &D, llvm::GlobalObject &GO);
613 llvm::LLVMContext &getLLVMContext() { return VMContext; } in getLLVMContext()
634 llvm::MDNode *getTBAAInfo(QualType QTy);
635 llvm::MDNode *getTBAAInfoForVTablePtr();
636 llvm::MDNode *getTBAAStructInfo(QualType QTy);
638 llvm::MDNode *getTBAAStructTypeInfo(QualType QTy);
640 llvm::MDNode *getTBAAStructTagInfo(QualType BaseTy, llvm::MDNode *AccessN,
652 void DecorateInstruction(llvm::Instruction *Inst,
653 llvm::MDNode *TBAAInfo,
657 llvm::ConstantInt *getSize(CharUnits numChars);
660 void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const;
664 void setTLSMode(llvm::GlobalValue *GV, const VarDecl &D) const;
666 static llvm::GlobalValue::VisibilityTypes GetLLVMVisibility(Visibility V) { in GetLLVMVisibility()
668 case DefaultVisibility: return llvm::GlobalValue::DefaultVisibility; in GetLLVMVisibility()
669 case HiddenVisibility: return llvm::GlobalValue::HiddenVisibility; in GetLLVMVisibility()
670 case ProtectedVisibility: return llvm::GlobalValue::ProtectedVisibility; in GetLLVMVisibility()
675 llvm::Constant *GetAddrOfGlobal(GlobalDecl GD) { in GetAddrOfGlobal()
692 llvm::GlobalVariable *
693 CreateOrReplaceCXXRuntimeVariable(StringRef Name, llvm::Type *Ty,
694 llvm::GlobalValue::LinkageTypes Linkage);
696 llvm::Function *
697 CreateGlobalInitOrDestructFunction(llvm::FunctionType *ty, const Twine &name,
711 llvm::Constant *GetAddrOfGlobalVar(const VarDecl *D,
712 llvm::Type *Ty = nullptr);
716 llvm::Constant *GetAddrOfFunction(GlobalDecl GD, llvm::Type *Ty = 0,
721 llvm::Constant *GetAddrOfRTTIDescriptor(QualType Ty, bool ForEH = false);
723 llvm::Constant *getAddrOfCXXCatchHandlerType(QualType Ty,
727 llvm::Constant *GetAddrOfUuidDescriptor(const CXXUuidofExpr* E);
730 llvm::Constant *GetAddrOfThunk(GlobalDecl GD, const ThunkInfo &Thunk);
733 llvm::Constant *GetWeakRefReference(const ValueDecl *VD);
737 llvm::Constant *
743 class ByrefHelpers : public llvm::FoldingSetNode {
745 llvm::Constant *CopyHelper;
746 llvm::Constant *DisposeHelper;
756 void Profile(llvm::FoldingSetNodeID &id) const { in Profile()
760 virtual void profileImpl(llvm::FoldingSetNodeID &id) const = 0;
764 llvm::Value *dest, llvm::Value *src) = 0;
767 virtual void emitDispose(CodeGenFunction &CGF, llvm::Value *field) = 0;
770 llvm::FoldingSet<ByrefHelpers> ByrefHelpersCache;
776 llvm::Type *getBlockDescriptorType();
779 llvm::Type *getGenericBlockLiteralType();
782 llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE, const char *);
785 llvm::Constant *GetAddrOfConstantCFString(const StringLiteral *Literal);
790 llvm::GlobalVariable *GetAddrOfConstantString(const StringLiteral *Literal);
793 llvm::Constant *GetConstantArrayFromStringLiteral(const StringLiteral *E);
796 llvm::GlobalVariable *
801 llvm::GlobalVariable *
809 llvm::GlobalVariable *
816 llvm::Constant *GetAddrOfConstantCompoundLiteral(const CompoundLiteralExpr*E);
820 llvm::Constant *GetAddrOfGlobalTemporary(const MaterializeTemporaryExpr *E,
830 llvm::Function *codegenCXXStructor(const CXXMethodDecl *MD,
834 llvm::GlobalValue *
837 llvm::FunctionType *FnType = nullptr,
842 llvm::Value *getBuiltinLibFunction(const FunctionDecl *FD,
845 llvm::Function *getIntrinsic(unsigned IID, ArrayRef<llvm::Type*> Tys = None);
869 void MaybeHandleStaticInExternC(const SomeDecl *D, llvm::GlobalValue *GV);
872 void addUsedGlobal(llvm::GlobalValue *GV);
875 void addCompilerUsedGlobal(llvm::GlobalValue *GV);
878 void AddCXXDtorEntry(llvm::Constant *DtorFn, llvm::Constant *Object) { in AddCXXDtorEntry()
883 llvm::Constant *CreateRuntimeFunction(llvm::FunctionType *Ty,
885 llvm::AttributeSet ExtraAttrs =
886 llvm::AttributeSet());
888 llvm::Constant *CreateBuiltinFunction(llvm::FunctionType *Ty,
890 llvm::AttributeSet ExtraAttrs =
891 llvm::AttributeSet());
893 llvm::Constant *CreateRuntimeVariable(llvm::Type *Ty,
899 llvm::Constant *getNSConcreteGlobalBlock();
900 llvm::Constant *getNSConcreteStackBlock();
901 llvm::Constant *getBlockObjectAssign();
902 llvm::Constant *getBlockObjectDispose();
906 llvm::Constant *getLLVMLifetimeStartFn();
907 llvm::Constant *getLLVMLifetimeEndFn();
912 llvm::Constant *getMemberPointerConstant(const UnaryOperator *e);
916 llvm::Constant *EmitConstantInit(const VarDecl &D,
921 llvm::Constant *EmitConstantExpr(const Expr *E, QualType DestType,
926 llvm::Constant *EmitConstantValue(const APValue &Value, QualType DestType,
931 llvm::Constant *EmitConstantValueForMemory(const APValue &Value,
938 llvm::Constant *EmitNullConstant(QualType T);
942 llvm::Constant *EmitNullConstantForBase(const CXXRecordDecl *Record);
956 void SetInternalFunctionAttributes(const Decl *D, llvm::Function *F,
962 llvm::Function *F);
966 void SetLLVMFunctionAttributesForDefinition(const Decl *D, llvm::Function *F);
1015 llvm::GlobalVariable::LinkageTypes getFunctionLinkage(GlobalDecl GD);
1017 void setFunctionLinkage(GlobalDecl GD, llvm::Function *F) { in setFunctionLinkage()
1023 llvm::GlobalVariable::LinkageTypes getVTableLinkage(const CXXRecordDecl *RD);
1026 CharUnits GetTargetTypeStoreSize(llvm::Type *Ty) const;
1029 llvm::GlobalValue::LinkageTypes
1034 llvm::GlobalValue::LinkageTypes
1041 llvm::Constant *EmitAnnotationString(StringRef Str);
1044 llvm::Constant *EmitAnnotationUnit(SourceLocation Loc);
1047 llvm::Constant *EmitAnnotationLineNo(SourceLocation L);
1056 llvm::Constant *EmitAnnotateAttr(llvm::GlobalValue *GV,
1062 void AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV);
1064 bool isInSanitizerBlacklist(llvm::Function *Fn, SourceLocation Loc) const;
1066 bool isInSanitizerBlacklist(llvm::GlobalVariable *GV, SourceLocation Loc,
1088 llvm::Function *F);
1090 llvm::GlobalValue *GetGlobalValue(StringRef Ref);
1096 void SetCommonAttributes(const Decl *D, llvm::GlobalValue *GV);
1102 void setAliasAttributes(const Decl *D, llvm::GlobalValue *GV);
1104 void addReplacement(StringRef Name, llvm::Constant *C);
1112 void EmitVTableBitSetEntries(llvm::GlobalVariable *VTable,
1116 llvm::Constant *getTerminateFn();
1119 llvm::Constant *
1120 GetOrCreateLLVMFunction(StringRef MangledName, llvm::Type *Ty, GlobalDecl D,
1123 llvm::AttributeSet ExtraAttrs = llvm::AttributeSet());
1125 llvm::Constant *GetOrCreateLLVMGlobal(StringRef MangledName,
1126 llvm::PointerType *PTy,
1129 void setNonAliasAttributes(const Decl *D, llvm::GlobalObject *GO);
1132 void SetFunctionAttributes(GlobalDecl GD, llvm::Function *F,
1135 void EmitGlobalDefinition(GlobalDecl D, llvm::GlobalValue *GV = nullptr);
1137 void EmitGlobalFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);
1161 llvm::GlobalVariable *Addr,
1164 void EmitPointerToInitFunc(const VarDecl *VD, llvm::GlobalVariable *Addr,
1165 llvm::Function *InitFunc, InitSegAttr *ISA);
1168 void AddGlobalCtor(llvm::Function *Ctor, int Priority = 65535,
1169 llvm::Constant *AssociatedData = 0);
1170 void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535);
1214 llvm::Constant *EmitUuidofInitializer(StringRef uuidstr);