Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:CGM

66       CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
69 llvm::AttributeSet::get(CGM.getLLVMContext(),
81 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.VoidTy,
94 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.DoubleTy,
111 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(resultType,
123 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
134 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
145 return CGM.CreateRuntimeFunction(
146 llvm::FunctionType::get(CGM.VoidTy, params, true),
156 return CGM.CreateRuntimeFunction(
157 llvm::FunctionType::get(CGM.VoidTy, params, true),
172 CodeGen::CodeGenModule &CGM;
198 CodeGen::CodeGenTypes &Types = CGM.getTypes();
199 ASTContext &Ctx = CGM.getContext();
236 CodeGen::CodeGenTypes &Types = CGM.getTypes();
237 ASTContext &Ctx = CGM.getContext();
250 return CGM.CreateRuntimeFunction(FTy, "objc_getProperty");
254 CodeGen::CodeGenTypes &Types = CGM.getTypes();
255 ASTContext &Ctx = CGM.getContext();
270 return CGM.CreateRuntimeFunction(FTy, "objc_setProperty");
274 CodeGen::CodeGenTypes &Types = CGM.getTypes();
275 ASTContext &Ctx = CGM.getContext();
306 return CGM.CreateRuntimeFunction(FTy, name);
310 CodeGen::CodeGenTypes &Types = CGM.getTypes();
311 ASTContext &Ctx = CGM.getContext();
323 return CGM.CreateRuntimeFunction(FTy, "objc_copyStruct");
331 CodeGen::CodeGenTypes &Types = CGM.getTypes();
332 ASTContext &Ctx = CGM.getContext();
343 return CGM.CreateRuntimeFunction(FTy, "objc_copyCppObjectAtomic");
347 CodeGen::CodeGenTypes &Types = CGM.getTypes();
348 ASTContext &Ctx = CGM.getContext();
356 return CGM.CreateRuntimeFunction(FTy, "objc_enumerationMutation");
365 return CGM.CreateRuntimeFunction(FTy, "objc_read_weak");
374 return CGM.CreateRuntimeFunction(FTy, "objc_assign_weak");
383 return CGM.CreateRuntimeFunction(FTy, "objc_assign_global");
392 return CGM.CreateRuntimeFunction(FTy, "objc_assign_threadlocal");
399 CGM.PtrDiffTy };
402 return CGM.CreateRuntimeFunction(FTy, "objc_assign_ivar");
410 return CGM.CreateRuntimeFunction(FTy, "objc_memmove_collectable");
419 return CGM.CreateRuntimeFunction(FTy, "objc_assign_strongCast");
427 llvm::FunctionType::get(CGM.VoidTy, args, false);
428 return CGM.CreateRuntimeFunction(FTy, "objc_exception_throw");
434 llvm::FunctionType *FTy = llvm::FunctionType::get(CGM.VoidTy, false);
435 return CGM.CreateRuntimeFunction(FTy, "objc_exception_rethrow");
443 llvm::FunctionType::get(CGM.IntTy, args, false);
444 return CGM.CreateRuntimeFunction(FTy, "objc_sync_enter");
452 llvm::FunctionType::get(CGM.IntTy, args, false);
453 return CGM.CreateRuntimeFunction(FTy, "objc_sync_exit");
488 ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm);
552 return CGM.CreateRuntimeFunction(
553 llvm::FunctionType::get(CGM.VoidTy, params, false),
560 return CGM.CreateRuntimeFunction(
561 llvm::FunctionType::get(CGM.VoidTy, params, false),
568 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
576 return CGM.CreateRuntimeFunction(
577 llvm::FunctionType::get(CGM.Int32Ty, params, false),
585 llvm::Type *params[] = { CGM.Int32Ty->getPointerTo() };
587 CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty,
590 llvm::AttributeSet::get(CGM.getLLVMContext(),
596 ObjCTypesHelper(CodeGen::CodeGenModule &cgm);
675 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
683 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
691 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
700 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
709 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
715 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.VoidTy, false),
722 return CGM.CreateRuntimeFunction(llvm::FunctionType::get(Int8PtrTy,
730 ObjCNonFragileABITypesHelper(CodeGen::CodeGenModule &cgm);
1028 CGObjCCommonMac(CodeGen::CodeGenModule &cgm) :
1029 CGObjCRuntime(cgm), VMContext(cgm.getLLVMContext()) { }
1052 llvm::Constant *BuildGCBlockLayout(CodeGen::CodeGenModule &CGM,
1054 llvm::Constant *BuildRCBlockLayout(CodeGen::CodeGenModule &CGM,
1057 llvm::Constant *BuildByrefLayout(CodeGen::CodeGenModule &CGM,
1174 CGObjCMac(CodeGen::CodeGenModule &cgm);
1415 IdentifierInfo* II = &CGM.getContext().Idents.get(name);
1416 return CGM.getContext().Selectors.getSelector(0, &II);
1420 IdentifierInfo* II = &CGM.getContext().Idents.get(name);
1421 return CGM.getContext().Selectors.getSelector(1, &II);
1449 CGObjCNonFragileABIMac(CodeGen::CodeGenModule &cgm);
1625 llvm::Constant *null = CGF.CGM.EmitNullConstant(resultType);
1696 CGObjCMac::CGObjCMac(CodeGen::CodeGenModule &cgm) : CGObjCCommonMac(cgm),
1697 ObjCTypes(cgm) {
1724 return CGM.GetAddrOfRTTIDescriptor(
1725 CGM.getContext().getObjCIdRedefinitionType(), /*ForEH=*/true);
1729 return CGM.GetAddrOfRTTIDescriptor(
1730 CGM.getContext().getObjCClassRedefinitionType(), /*ForEH=*/true);
1733 return CGM.GetAddrOfRTTIDescriptor(T, /*ForEH=*/true);
1759 return (CGM.getLangOpts().NoConstantCFStrings == 0 ?
1760 CGM.GetAddrOfConstantCFString(SL) :
1761 CGM.GetAddrOfConstantString(SL));
1824 CGM.getTypes().ConvertType(CGF.getContext().getObjCClassType());
1881 assert(CGM.getContext().getCanonicalType(Method->getReturnType()) ==
1882 CGM.getContext().getCanonicalType(ResultType) &&
1915 if (CGM.ReturnSlotInterferesWithArgs(MSI.CallInfo)) {
1919 } else if (CGM.ReturnTypeUsesFPRet(ResultType)) {
1922 } else if (CGM.ReturnTypeUsesFP2Ret(ResultType)) {
1928 if (ReceiverCanBeNull && CGM.ReturnTypeUsesSRet(MSI.CallInfo))
1936 if (ReceiverCanBeNull && CGM.getLangOpts().ObjCAutoRefCount && Method) {
2014 CodeGenModule &CGM;
2031 IvarLayoutBuilder(CodeGenModule &CGM, CharUnits instanceBegin,
2033 : CGM(CGM), InstanceBegin(instanceBegin), InstanceEnd(instanceEnd),
2067 llvm::Constant *CGObjCCommonMac::BuildGCBlockLayout(CodeGenModule &CGM,
2070 llvm::Constant *nullPtr = llvm::Constant::getNullValue(CGM.Int8PtrTy);
2071 if (CGM.getLangOpts().getGC() == LangOptions::NonGC)
2074 IvarLayoutBuilder builder(CGM, CharUnits::Zero(), blockInfo.BlockSize,
2084 if (CGM.getLangOpts().ObjCGCBitmapPrint && !buffer.empty()) {
2134 Qualifiers::GC GCAttr = GetGCAttrTypeForType(CGM.getContext(), type);
2137 assert(CGM.getContext().getTypeSize(type)
2138 == CGM.getTarget().getPointerWidth(0));
2155 if (CGM.getLangOpts().ObjCAutoRefCount)
2202 unsigned ByteSizeInBits = CGM.getTarget().getCharWidth();
2208 const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
2210 CGM.getContext().toCharUnitsFromBits(RL.getFieldOffset(i));
2230 if (const ArrayType *Array = CGM.getContext().getAsArrayType(FQT)) {
2236 while (const ArrayType *Array = CGM.getContext().getAsArrayType(FQT)) {
2252 CharUnits Size = CGM.getContext().getTypeSizeInChars(RT);
2262 CharUnits FieldSize = CGM.getContext().getTypeSizeInChars(Field->getType());
2282 = LastFieldBitfieldOrUnnamed->getBitWidthValue(CGM.getContext());
2296 = CGM.getContext().getTypeSizeInChars(LastFieldBitfieldOrUnnamed->getType());
2318 llvm::Type *Ty = CGM.getTypes().ConvertType(QualType(RT, 0));
2320 CGM.getDataLayout().getStructLayout(cast<llvm::StructType>(Ty));
2432 llvm::Constant *nullPtr = llvm::Constant::getNullValue(CGM.Int8PtrTy);
2435 unsigned WordSizeInBits = CGM.getTarget().getPointerWidth(0);
2436 unsigned ByteSizeInBits = CGM.getTarget().getCharWidth();
2506 if (CGM.getLangOpts().ObjCGCBitmapPrint) {
2520 return llvm::ConstantInt::get(CGM.IntPtrTy, Result);
2529 if (CGM.getLangOpts().ObjCGCBitmapPrint) {
2579 llvm::Constant *CGObjCCommonMac::BuildRCBlockLayout(CodeGenModule &CGM,
2581 assert(CGM.getLangOpts().getGC() == LangOptions::NonGC);
2586 unsigned WordSizeInBits = CGM.getTarget().getPointerWidth(0);
2587 unsigned ByteSizeInBits = CGM.getTarget().getCharWidth();
2594 CGM.getDataLayout().getStructLayout(blockInfo.StructureType);
2625 fieldSize = CGM.getContext().getTypeSizeInChars(type);
2633 llvm::Constant *CGObjCCommonMac::BuildByrefLayout(CodeGen::CodeGenModule &CGM,
2635 assert(CGM.getLangOpts().getGC() == LangOptions::NonGC);
2644 Result = llvm::ConstantExpr::getIntToPtr(Result, CGM.Int8PtrTy);
2647 llvm::Constant *nullPtr = llvm::Constant::getNullValue(CGM.Int8PtrTy);
2655 LazySymbols.insert(&CGM.getContext().Idents.get("Protocol"));
2705 LazySymbols.insert(&CGM.getContext().Idents.get("Protocol"));
2762 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolTy,
2771 CGM.addCompilerUsedGlobal(Entry);
2783 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolTy,
2809 CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ProtocolExtensionTy);
2833 StringRef(), CGM.getPointerAlign(), true);
2872 CGM.getPointerAlign(), false);
2947 CGM.getDataLayout().getTypeAllocSize(ObjCTypes.PropertyTy);
2960 CGM.getPointerAlign(),
2979 CGM.getPointerAlign(), true);
3018 CreateMetadataVar(Name, Init, Section, CGM.getPointerAlign(), true);
3035 unsigned Size = CGM.getDataLayout().getTypeAllocSize(ObjCTypes.CategoryTy);
3091 CGM.getPointerAlign(), true);
3167 static bool hasMRCWeakIvars(CodeGenModule &CGM,
3169 if (!CGM.getLangOpts().ObjCWeak) return false;
3170 assert(CGM.getLangOpts().getGC() == LangOptions::NonGC);
3218 if (CGM.getLangOpts().ObjCAutoRefCount)
3220 else if ((hasMRCWeak = hasMRCWeakIvars(CGM, ID)))
3224 CGM.getContext().getASTObjCImplementationLayout(ID).getSize();
3284 llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name, true);
3290 GV->setAlignment(CGM.getPointerAlign().getQuantity());
3291 CGM.addCompilerUsedGlobal(GV);
3293 GV = CreateMetadataVar(Name, Init, Section, CGM.getPointerAlign(), true);
3304 unsigned Size = CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ClassTy);
3350 llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name, true);
3356 GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassTy, false,
3362 CGM.addCompilerUsedGlobal(GV);
3378 llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name, true);
3380 GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassTy, false,
3391 llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name, true);
3394 GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassTy, false,
3418 CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ClassExtensionTy);
3435 CGM.getPointerAlign(), true);
3473 ComputeIvarBaseOffset(CGM, OID, IVD))
3494 CGM.getPointerAlign(), true);
3498 CGM.getPointerAlign(), true);
3549 CreateMetadataVar(Name, Init, Section, CGM.getPointerAlign(), true);
3558 CodeGenTypes &Types = CGM.getTypes();
3565 &CGM.getModule());
3578 new llvm::GlobalVariable(CGM.getModule(), Ty, false,
3584 CGM.addCompilerUsedGlobal(GV);
4324 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
4346 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
4373 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
4393 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
4433 uint64_t Offset = ComputeIvarBaseOffset(CGM, Interface, Ivar);
4435 CGM.getTypes().ConvertType(CGM.getContext().LongTy),
4469 llvm::Module &Mod = CGM.getModule();
4478 if (CGM.getLangOpts().getGC() == LangOptions::NonGC) {
4488 if (CGM.getLangOpts().getGC() == LangOptions::GCOnly) {
4504 const llvm::Triple &Triple = CGM.getTarget().getTriple();
4523 uint64_t Size = CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ModuleTy);
4535 CGM.getPointerAlign(), true);
4580 CGM.getPointerAlign(), true);
4597 CGM.getPointerAlign(), true);
4609 IdentifierInfo *II = &CGM.getContext().Idents.get("NSAutoreleasePool");
4675 recLayout = &CGM.getContext().getASTRecordLayout(RD);
4677 return CGM.getContext().toCharUnitsFromBits(offsetInBits);
4707 while (auto arrayType = CGM.getContext().getAsConstantArrayType(fieldType)) {
4727 CharUnits eltSize = CGM.getContext().getTypeSizeInChars(recType);
4743 Qualifiers::GC GCAttr = GetGCAttrTypeForType(CGM.getContext(), fieldType);
4748 assert(CGM.getContext().getTypeSizeInChars(fieldType)
4749 == CGM.getPointerSize());
4835 const CharUnits WordSize = CGM.getPointerSize();
4878 return llvm::ConstantPointerNull::get(CGM.Int8PtrTy);
4883 if (CGM.getLangOpts().getGC() != LangOptions::NonGC) {
4898 llvm::ConstantDataArray::get(CGM.getLLVMContext(), buffer),
4902 return getConstantGEP(CGM.getLLVMContext(), Entry, 0, 0);
4927 llvm::Type *PtrTy = CGM.Int8PtrTy;
4928 if (CGM.getLangOpts().getGC() == LangOptions::NonGC &&
4929 !CGM.getLangOpts().ObjCAutoRefCount &&
4947 if (CGM.getLangOpts().getGC() == LangOptions::NonGC) {
4956 CharUnits::fromQuantity(ComputeIvarBaseOffset(CGM, OMD, ivars[0]));
4961 baseOffset = baseOffset.RoundUpToAlignment(CGM.getPointerAlign());
4964 CGM.getContext().DeepCollectObjCIvars(OI, true, ivars);
4972 IvarLayoutBuilder builder(CGM, baseOffset, endOffset, ForStrongLayout);
4976 return CharUnits::fromQuantity(ComputeIvarBaseOffset(CGM, OMD, ivar));
4985 if (CGM.getLangOpts().ObjCGCBitmapPrint && !buffer.empty()) {
5011 return GetMethodVarName(CGM.getContext().Selectors.getNullarySelector(ID));
5016 CGM.getContext().getObjCEncodingForType(Field->getType(), TypeStr, Field);
5034 if (CGM.getContext().getObjCEncodingForMethodDecl(D, TypeStr, Extended))
5069 CGM.getContext().getObjCEncodingForPropertyDecl(PD, Container, TypeStr);
5070 return GetPropertyName(&CGM.getContext().Idents.get(TypeStr));
5104 CGM.addCompilerUsedGlobal(I->second);
5114 Asm += CGM.getModule().getModuleInlineAsm();
5133 CGM.getModule().setModuleInlineAsm(OS.str());
5137 CGObjCNonFragileABIMac::CGObjCNonFragileABIMac(CodeGen::CodeGenModule &cgm)
5138 : CGObjCCommonMac(cgm),
5139 ObjCTypes(cgm) {
5146 ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5147 : VMContext(cgm.getLLVMContext()), CGM(cgm), ExternalProtocolPtrTy(nullptr)
5149 CodeGen::CodeGenTypes &Types = CGM.getTypes();
5150 ASTContext &Ctx = CGM.getContext();
5156 Int8PtrTy = CGM.Int8PtrTy;
5157 Int8PtrPtrTy = CGM.Int8PtrPtrTy;
5161 if (CGM.getTarget().getTriple().getArch() == llvm::Triple::aarch64)
5233 ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5234 : ObjCCommonTypesHelper(cgm) {
5406 llvm::Type *StackPtrTy = llvm::ArrayType::get(CGM.Int8PtrTy, 4);
5410 llvm::ArrayType::get(CGM.Int32Ty,SetJmpBufferSize),
5415 ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModule &cgm)
5416 : ObjCCommonTypesHelper(cgm) {
5556 CodeGen::CodeGenTypes &Types = CGM.getTypes();
5557 ASTContext &Ctx = CGM.getContext();
5635 new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
5639 GV->setAlignment(CGM.getDataLayout().getABITypeAlignment(Init->getType()));
5641 CGM.addCompilerUsedGlobal(GV);
5684 switch (CGM.getCodeGenOpts().getObjCDispatchMethod()) {
5705 if (CGM.getLangOpts().getGC() != LangOptions::GCOnly) {
5721 if (CGM.getLangOpts().getGC() != LangOptions::NonGC) {
5727 &CGM.getContext().Idents.get("countByEnumeratingWithState"),
5728 &CGM.getContext().Idents.get("objects"),
5729 &CGM.getContext().Idents.get("count")
5732 CGM.getContext().Selectors.getSelector(3, KeyIdents));
5766 if (CGM.getLangOpts().ObjCAutoRefCount)
5768 else if ((hasMRCWeak = hasMRCWeakIvars(CGM, ID)))
5832 new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassRonfABITy, false,
5839 CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ClassRonfABITy));
5876 CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ClassnfABITy));
5891 CGM.getContext().getASTObjCImplementationLayout(OID);
5900 InstanceStart = RL.getFieldOffset(0) / CGM.getContext().getCharWidth();
5907 CGM.getModule(),
5916 const llvm::Triple &Triple = CGM.getTarget().getTriple();
5923 CGM.getModule(),
5934 CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ClassnfABITy);
6013 if (hasObjCExceptionAttribute(CGM.getContext(), ID->getClassInterface()))
6076 llvm::GlobalVariable *PTGV = CGM.getModule().getGlobalVariable(ProtocolName);
6080 CGM.getModule(),
6088 CGM.addCompilerUsedGlobal(PTGV);
6173 = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.CategorynfABITy,
6179 CGM.getDataLayout().getABITypeAlignment(ObjCTypes.CategorynfABITy));
6181 CGM.addCompilerUsedGlobal(GCATV);
6226 unsigned Size = CGM.getDataLayout().getTypeAllocSize(ObjCTypes.MethodTy);
6236 new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
6238 GV->setAlignment(CGM.getDataLayout().getABITypeAlignment(Init->getType()));
6240 CGM.addCompilerUsedGlobal(GV);
6256 CGM.getModule().getGlobalVariable(Name);
6259 CGM.getModule(), ObjCTypes.IvarOffsetVarTy, false,
6272 CGM.getDataLayout().getABITypeAlignment(ObjCTypes.IvarOffsetVarTy));
6320 ComputeIvarBaseOffset(CGM, ID, IVD));
6324 CGM.getTypes().ConvertTypeForMem(IVD->getType());
6325 unsigned Size = CGM.getDataLayout().getTypeAllocSize(FieldTy);
6326 unsigned Align = CGM.getContext().getPreferredTypeAlign(
6343 unsigned Size = CGM.getDataLayout().getTypeAllocSize(ObjCTypes.IvarnfABITy);
6352 new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
6357 CGM.getDataLayout().getABITypeAlignment(Init->getType()));
6360 CGM.addCompilerUsedGlobal(GV);
6373 new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolnfABITy,
6476 CGM.getDataLayout().getTypeAllocSize(ObjCTypes.ProtocolnfABITy);
6494 new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolnfABITy,
6498 CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ProtocolnfABITy));
6504 CGM.addCompilerUsedGlobal(Entry);
6509 new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ProtocolnfABIPtrTy,
6513 CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ProtocolnfABIPtrTy));
6516 CGM.addCompilerUsedGlobal(PTGV);
6542 CGM.getModule().getGlobalVariable(TmpName.str(), true);
6562 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), false,
6567 CGM.getDataLayout().getABITypeAlignment(Init->getType()));
6568 CGM.addCompilerUsedGlobal(GV);
6622 ->setMetadata(CGM.getModule().getMDKindID("invariant.load"),
6694 if (CGM.ReturnSlotInterferesWithArgs(MSI.CallInfo)) {
6703 } else if (!isSuper && CGM.ReturnTypeUsesFPRet(resultType)) {
6723 = CGM.getModule().getGlobalVariable(messageRefName);
6728 messageRef = new llvm::GlobalVariable(CGM.getModule(),
6740 if (CGM.getLangOpts().ObjCAutoRefCount && method)
6795 llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name);
6798 GV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABITy,
6817 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
6822 CGM.addCompilerUsedGlobal(Entry);
6834 IdentifierInfo *II = &CGM.getContext().Idents.get("NSAutoreleasePool");
6849 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
6854 CGM.addCompilerUsedGlobal(Entry);
6873 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.ClassnfABIPtrTy,
6879 CGM.addCompilerUsedGlobal(Entry);
6937 CGM.getTypes().ConvertType(CGF.getContext().getObjCClassType());
6957 LI->setMetadata(CGM
6971 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.SelectorPtrTy,
6977 CGM.addCompilerUsedGlobal(Entry);
6992 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
7012 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
7058 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
7079 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy);
7110 CGM.getModule().getGlobalVariable("OBJC_EHTYPE_id");
7113 new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.EHTypeTy,
7169 if (hasObjCExceptionAttribute(CGM.getContext(), ID))
7171 new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.EHTypeTy, false,
7185 CGM.getModule().getGlobalVariable(VTableName);
7187 VTableGV = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.Int8PtrTy,
7192 llvm::Value *VTableIdx = llvm::ConstantInt::get(CGM.Int32Ty, 2);
7210 Entry = new llvm::GlobalVariable(CGM.getModule(), ObjCTypes.EHTypeTy, false,
7219 Entry->setAlignment(CGM.getDataLayout().getABITypeAlignment(
7233 CodeGen::CreateMacObjCRuntime(CodeGen::CodeGenModule &CGM) {
7234 switch (CGM.getLangOpts().ObjCRuntime.getKind()) {
7236 return new CGObjCMac(CGM);
7241 return new CGObjCNonFragileABIMac(CGM);