Lines Matching refs:CGM
46 CodeGenModule *CGM; member in __anonc6edbebb0111::LazyRuntimeFunction
56 : CGM(nullptr), FunctionName(nullptr), Function(nullptr) {} in LazyRuntimeFunction()
62 CGM = Mod; in init()
83 cast<llvm::Constant>(CGM->CreateRuntimeFunction(FTy, FunctionName)); in operator llvm::Constant*()
168 ConstantAddress Array = CGM.GetAddrOfConstantCString(Str, Name.c_str()); in MakeConstantString()
237 const ObjCRuntime &R = CGM.getLangOpts().ObjCRuntime; in MakePropertyEncodingString()
242 CGM.getContext().getObjCEncodingForPropertyDecl(PD, Container, TypeStr); in MakePropertyEncodingString()
581 llvm::Constant *BuildGCBlockLayout(CodeGenModule &CGM, in BuildGCBlockLayout() argument
585 llvm::Constant *BuildRCBlockLayout(CodeGenModule &CGM, in BuildRCBlockLayout() argument
590 llvm::Constant *BuildByrefLayout(CodeGenModule &CGM, QualType T) override { in BuildByrefLayout() argument
641 MsgLookupFn.init(&CGM, "objc_msg_lookup", IMPTy, IdTy, SelectorTy, in CGObjCGCC()
644 MsgLookupSuperFn.init(&CGM, "objc_msg_lookup_super", IMPTy, in CGObjCGCC()
738 const ObjCRuntime &R = CGM.getLangOpts().ObjCRuntime; in CGObjCGNUstep()
744 SlotLookupFn.init(&CGM, "objc_msg_lookup_sender", SlotTy, PtrToIdTy, in CGObjCGNUstep()
747 SlotLookupSuperFn.init(&CGM, "objc_slot_lookup_super", SlotTy, in CGObjCGNUstep()
750 if (CGM.getLangOpts().CPlusPlus) { in CGObjCGNUstep()
753 EnterCatchFn.init(&CGM, "__cxa_begin_catch", PtrTy, PtrTy, nullptr); in CGObjCGNUstep()
755 ExitCatchFn.init(&CGM, "__cxa_end_catch", VoidTy, nullptr); in CGObjCGNUstep()
757 ExceptionReThrowFn.init(&CGM, "_Unwind_Resume_or_Rethrow", VoidTy, in CGObjCGNUstep()
762 EnterCatchFn.init(&CGM, "objc_begin_catch", IdTy, PtrTy, nullptr); in CGObjCGNUstep()
764 ExitCatchFn.init(&CGM, "objc_end_catch", VoidTy, nullptr); in CGObjCGNUstep()
766 ExceptionReThrowFn.init(&CGM, "objc_exception_rethrow", VoidTy, in CGObjCGNUstep()
770 SetPropertyAtomic.init(&CGM, "objc_setProperty_atomic", VoidTy, IdTy, in CGObjCGNUstep()
772 SetPropertyAtomicCopy.init(&CGM, "objc_setProperty_atomic_copy", VoidTy, in CGObjCGNUstep()
774 SetPropertyNonAtomic.init(&CGM, "objc_setProperty_nonatomic", VoidTy, in CGObjCGNUstep()
776 SetPropertyNonAtomicCopy.init(&CGM, "objc_setProperty_nonatomic_copy", in CGObjCGNUstep()
780 CxxAtomicObjectSetFn.init(&CGM, "objc_setCppObjectAtomic", VoidTy, PtrTy, in CGObjCGNUstep()
784 CxxAtomicObjectGetFn.init(&CGM, "objc_getCppObjectAtomic", VoidTy, PtrTy, in CGObjCGNUstep()
791 assert (CGM.getLangOpts().ObjCRuntime.getVersion() >= in GetCppAtomicObjectGetFunction()
799 assert (CGM.getLangOpts().ObjCRuntime.getVersion() >= in GetCppAtomicObjectSetFunction()
809 assert ((CGM.getLangOpts().getGC() == LangOptions::NonGC)); in GetOptimizedPropertySetFunction()
812 assert (CGM.getLangOpts().ObjCRuntime.getVersion() >= in GetOptimizedPropertySetFunction()
847 if (CGM.ReturnTypeUsesSRet(MSI.CallInfo)) in LookupIMP()
862 if (CGM.ReturnTypeUsesSRet(MSI.CallInfo)) in LookupIMPSuper()
890 MsgLookupFn.init(&CGM, "objc_msg_lookup", IMPTy, IdTy, SelectorTy, nullptr); in CGObjCObjFW()
891 MsgLookupFnSRet.init(&CGM, "objc_msg_lookup_stret", IMPTy, IdTy, in CGObjCObjFW()
894 MsgLookupSuperFn.init(&CGM, "objc_msg_lookup_super", IMPTy, in CGObjCObjFW()
896 MsgLookupSuperFnSRet.init(&CGM, "objc_msg_lookup_super_stret", IMPTy, in CGObjCObjFW()
933 : CGObjCRuntime(cgm), TheModule(CGM.getModule()), in CGObjCGNU()
940 CodeGenTypes &Types = CGM.getTypes(); in CGObjCGNU()
942 Types.ConvertType(CGM.getContext().IntTy)); in CGObjCGNU()
944 Types.ConvertType(CGM.getContext().LongTy)); in CGObjCGNU()
946 Types.ConvertType(CGM.getContext().getSizeType())); in CGObjCGNU()
948 Types.ConvertType(CGM.getContext().getPointerDiffType())); in CGObjCGNU()
949 BoolTy = CGM.getTypes().ConvertType(CGM.getContext().BoolTy); in CGObjCGNU()
959 QualType selTy = CGM.getContext().getObjCSelType(); in CGObjCGNU()
963 SelectorTy = cast<llvm::PointerType>(CGM.getTypes().ConvertType(selTy)); in CGObjCGNU()
973 CGM.getDataLayout().getPointerSizeInBits() == 32 ? Int32Ty : Int64Ty; in CGObjCGNU()
976 QualType UnqualIdTy = CGM.getContext().getObjCIdType(); in CGObjCGNU()
979 ASTIdTy = CGM.getContext().getCanonicalType(UnqualIdTy); in CGObjCGNU()
980 IdTy = cast<llvm::PointerType>(CGM.getTypes().ConvertType(ASTIdTy)); in CGObjCGNU()
992 ExceptionThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy, nullptr); in CGObjCGNU()
993 ExceptionReThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy, nullptr); in CGObjCGNU()
995 SyncEnterFn.init(&CGM, "objc_sync_enter", IntTy, IdTy, nullptr); in CGObjCGNU()
997 SyncExitFn.init(&CGM, "objc_sync_exit", IntTy, IdTy, nullptr); in CGObjCGNU()
1000 EnumerationMutationFn.init(&CGM, "objc_enumerationMutation", VoidTy, in CGObjCGNU()
1004 GetPropertyFn.init(&CGM, "objc_getProperty", IdTy, IdTy, SelectorTy, in CGObjCGNU()
1007 SetPropertyFn.init(&CGM, "objc_setProperty", VoidTy, IdTy, SelectorTy, in CGObjCGNU()
1010 GetStructPropertyFn.init(&CGM, "objc_getPropertyStruct", VoidTy, PtrTy, PtrTy, in CGObjCGNU()
1013 SetStructPropertyFn.init(&CGM, "objc_setPropertyStruct", VoidTy, PtrTy, PtrTy, in CGObjCGNU()
1021 const LangOptions &Opts = CGM.getLangOpts(); in CGObjCGNU()
1031 RetainSel = GetNullarySelector("retain", CGM.getContext()); in CGObjCGNU()
1032 ReleaseSel = GetNullarySelector("release", CGM.getContext()); in CGObjCGNU()
1033 AutoreleaseSel = GetNullarySelector("autorelease", CGM.getContext()); in CGObjCGNU()
1038 IvarAssignFn.init(&CGM, "objc_assign_ivar", IdTy, IdTy, IdTy, PtrDiffTy, in CGObjCGNU()
1041 StrongCastAssignFn.init(&CGM, "objc_assign_strongCast", IdTy, IdTy, in CGObjCGNU()
1044 GlobalAssignFn.init(&CGM, "objc_assign_global", IdTy, IdTy, PtrToIdTy, in CGObjCGNU()
1047 WeakAssignFn.init(&CGM, "objc_assign_weak", IdTy, IdTy, PtrToIdTy, nullptr); in CGObjCGNU()
1049 WeakReadFn.init(&CGM, "objc_read_weak", IdTy, PtrToIdTy, nullptr); in CGObjCGNU()
1051 MemMoveFn.init(&CGM, "objc_memmove_collectable", PtrTy, PtrTy, PtrTy, in CGObjCGNU()
1071 CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, PtrToInt8Ty, true), in GetClassNamed()
1127 CGM.getContext().getObjCEncodingForMethodDecl(Method, SelTypes); in GetSelector()
1137 if (CGM.getLangOpts().ObjCRuntime.isNonFragile()) { in GetEHType()
1153 if (!CGM.getLangOpts().CPlusPlus) in GetEHType()
1163 CGM.getModule().getGlobalVariable("__objc_id_type_info"); in GetEHType()
1166 new llvm::GlobalVariable(CGM.getModule(), PtrToInt8Ty, in GetEHType()
1212 fields, CGM.getPointerAlign(), in GetEHType()
1222 CharUnits Align = CGM.getPointerAlign(); in GenerateConstantString()
1229 StringRef StringClass = CGM.getLangOpts().ObjCConstantStringClass; in GenerateConstantString()
1272 if (CGM.getLangOpts().getGC() == LangOptions::GCOnly) { in GenerateMessageSendSuper()
1275 CGM.getTypes().ConvertType(ResultType))); in GenerateMessageSendSuper()
1295 classLookupFunction = CGM.CreateRuntimeFunction(llvm::FunctionType::get( in GenerateMessageSendSuper()
1298 classLookupFunction = CGM.CreateRuntimeFunction(llvm::FunctionType::get( in GenerateMessageSendSuper()
1380 if (CGM.getLangOpts().getGC() == LangOptions::GCOnly) { in GenerateMessageSend()
1383 CGM.getTypes().ConvertType(ResultType))); in GenerateMessageSend()
1419 IdTy = cast<llvm::PointerType>(CGM.getTypes().ConvertType(ASTIdTy)); in GenerateMessageSend()
1448 switch (CGM.getCodeGenOpts().getObjCDispatchMethod()) { in GenerateMessageSend()
1454 if (CGM.ReturnTypeUsesFPRet(ResultType)) { in GenerateMessageSend()
1455 imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), in GenerateMessageSend()
1457 } else if (CGM.ReturnTypeUsesSRet(MSI.CallInfo)) { in GenerateMessageSend()
1460 imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), in GenerateMessageSend()
1463 imp = CGM.CreateRuntimeFunction(llvm::FunctionType::get(IdTy, IdTy, true), in GenerateMessageSend()
1566 return MakeGlobal(ObjCMethodListTy, Methods, CGM.getPointerAlign(), in GenerateMethodList()
1602 return MakeGlobal(ObjCIvarListTy, Elements, CGM.getPointerAlign(), in GenerateIvarList()
1664 CGM.getContext().getCharWidth())); in GenerateClassStructure()
1687 MakeGlobal(ClassTy, Elements, CGM.getPointerAlign(), ClassSym, in GenerateClassStructure()
1720 return MakeGlobal(ObjCMethodDescListTy, Methods, CGM.getPointerAlign(), in GenerateProtocolMethodList()
1754 return MakeGlobal(ProtocolListTy, Elements, CGM.getPointerAlign(), in GenerateProtocolList()
1762 CGM.getTypes().ConvertType(CGM.getContext().getObjCProtoType()); in GenerateProtocolRef()
1791 return MakeGlobal(ProtocolTy, Elements, CGM.getPointerAlign(), in GenerateEmptyProtocol()
1796 ASTContext &Context = CGM.getContext(); in GenerateProtocol()
1948 CGM.getPointerAlign(), ".objc_protocol"), IdTy); in GenerateProtocol()
1990 ProtocolElements, CGM.getPointerAlign(), in GenerateProtocolHolderCategory()
1994 PtrTy, PtrTy, PtrTy, nullptr), Elements, CGM.getPointerAlign()), in GenerateProtocolHolderCategory()
2011 int ptrBits = CGM.getDataLayout().getPointerSizeInBits(); in MakeBitField()
2049 CGM.getContext().getObjCEncodingForMethodDecl(I,TypeStr); in GenerateCategory()
2059 CGM.getContext().getObjCEncodingForMethodDecl(I,TypeStr); in GenerateCategory()
2087 PtrTy, PtrTy, PtrTy, nullptr), Elements, CGM.getPointerAlign()), in GenerateCategory()
2094 ASTContext &Context = CGM.getContext(); in GeneratePropertyList()
2167 ASTContext &Context = CGM.getContext(); in GenerateClass()
2211 if (CGM.getLangOpts().ObjCRuntime.isNonFragile()) { in GenerateClass()
2224 uint64_t BaseOffset = ComputeIvarBaseOffset(CGM, OID, IVD); in GenerateClass()
2226 if (CGM.getLangOpts().ObjCRuntime.isNonFragile()) { in GenerateClass()
2266 MakeGlobalArray(PtrToIntTy, IvarOffsetValues, CGM.getPointerAlign(), in GenerateClass()
2412 StringRef StringClass = CGM.getLangOpts().ObjCConstantStringClass; in ModuleInitFunction()
2424 Statics = MakeGlobal(StaticsListTy, Elements, CGM.getPointerAlign(), in ModuleInitFunction()
2432 CGM.getPointerAlign(), ".objc_statics_ptr"); in ModuleInitFunction()
2483 MakeGlobalArray(SelStructTy, Selectors, CGM.getPointerAlign(), in ModuleInitFunction()
2518 MakeGlobal(SymTabTy, Elements, CGM.getPointerAlign()); in ModuleInitFunction()
2533 CGM.getContext().getCharWidth())); in ModuleInitFunction()
2536 SourceManager &SM = CGM.getContext().getSourceManager(); in ModuleInitFunction()
2544 switch (CGM.getLangOpts().getGC()) { in ModuleInitFunction()
2549 if (CGM.getLangOpts().ObjCAutoRefCount) in ModuleInitFunction()
2559 llvm::Value *Module = MakeGlobal(ModuleTy, Elements, CGM.getPointerAlign()); in ModuleInitFunction()
2569 CGBuilderTy Builder(CGM, VMContext); in ModuleInitFunction()
2575 llvm::Value *Register = CGM.CreateRuntimeFunction(FT, "__objc_exec_class"); in ModuleInitFunction()
2631 CodeGenTypes &Types = CGM.getTypes(); in GenerateMethod()
2802 if (!CGM.getContext().getObjCImplementation( in ObjCIvarOffsetVariable()
2804 Offset = ComputeIvarBaseOffset(CGM, ID, Ivar); in ObjCIvarOffsetVariable()
2812 if (CGM.getLangOpts().PICLevel) { in ObjCIvarOffsetVariable()
2858 if (CGM.getLangOpts().ObjCRuntime.isNonFragile()) { in EmitIvarOffset()
2859 Interface = FindIvarInterface(CGM.getContext(), Interface, Ivar); in EmitIvarOffset()
2868 CharUnits Align = CGM.getIntAlign(); in EmitIvarOffset()
2882 uint64_t Offset = ComputeIvarBaseOffset(CGF.CGM, Interface, Ivar); in EmitIvarOffset()
2887 clang::CodeGen::CreateGNUObjCRuntime(CodeGenModule &CGM) { in CreateGNUObjCRuntime() argument
2888 switch (CGM.getLangOpts().ObjCRuntime.getKind()) { in CreateGNUObjCRuntime()
2890 return new CGObjCGNUstep(CGM); in CreateGNUObjCRuntime()
2893 return new CGObjCGCC(CGM); in CreateGNUObjCRuntime()
2896 return new CGObjCObjFW(CGM); in CreateGNUObjCRuntime()