Lines Matching refs:CGM

50       CGM.getObjCRuntime().GenerateConstantString(E->getString());
72 CGObjCRuntime &Runtime = CGM.getObjCRuntime();
91 ASTContext &Context = CGM.getContext();
118 CGM.getCodeGenOpts().OptimizationLevel != 0);
174 llvm::ConstantInt::get(CGM.getTypes().ConvertType(ArgQT), NumElements);
184 CGObjCRuntime &Runtime = CGM.getObjCRuntime();
222 return CGM.getObjCRuntime().GetSelector(*this, E->getSelector());
227 return CGM.getObjCRuntime().GenerateProtocolRef(*this, E->getProtocol());
312 CGM.getLangOpts().ObjCAutoRefCount &&
316 CGObjCRuntime &Runtime = CGM.getObjCRuntime();
450 CGF.CGM.getObjCRuntime().GenerateMessageSendSuper(CGF, ReturnValueSlot(),
474 llvm::Function *Fn = CGM.getObjCRuntime().GenerateMethod(OMD, CD);
476 const CGFunctionInfo &FI = CGM.getTypes().arrangeObjCMethodDeclaration(OMD);
477 CGM.SetInternalFunctionAttributes(OMD, Fn, FI);
491 if (CGM.getLangOpts().ObjCAutoRefCount &&
533 args.add(RValue::get(CGF.CGM.getSize(size)), Context.getSizeType());
537 llvm::Value *fn = CGF.CGM.getObjCRuntime().GetGetStructFunction();
555 static CharUnits getMaxAtomicAccessSize(CodeGenModule &CGM,
562 return CharUnits::fromQuantity(CGM.PointerSizeInBytes);
597 PropertyImplStrategy(CodeGenModule &CGM,
612 PropertyImplStrategy::PropertyImplStrategy(CodeGenModule &CGM,
625 = CGM.getContext().getTypeInfoInChars(ivarType);
637 if (CGM.getLangOpts().getGC() == LangOptions::GCOnly) {
643 } else if (CGM.getLangOpts().ObjCAutoRefCount && !IsAtomic) {
687 (CGM.getLangOpts().getGC() &&
688 CGM.getContext().getObjCGCAttrKind(ivarType))) {
694 if (CGM.getLangOpts().getGC())
717 CGM.getTarget().getTriple().getArch();
729 if (IvarSize > getMaxAtomicAccessSize(CGM, arch)) {
803 CGF.CGM.getObjCRuntime().GetCppAtomicObjectGetFunction();
838 PropertyImplStrategy strategy(CGM, propImpl);
873 CGM.getObjCRuntime().GetPropertyGetFunction();
875 CGM.ErrorUnsupported(propImpl, "Obj-C getter requiring atomic copy");
997 CGF.CGM.getSize(CGF.getContext().getTypeSizeInChars(ivar->getType()));
1007 llvm::Value *copyStructFn = CGF.CGM.getObjCRuntime().GetSetStructFunction();
1045 CGF.CGM.getObjCRuntime().GetCppAtomicObjectSetFunction();
1080 static bool UseOptimizedSetter(CodeGenModule &CGM) {
1081 if (CGM.getLangOpts().getGC() != LangOptions::NonGC)
1083 return CGM.getLangOpts().ObjCRuntime.hasOptimizedSetter();
1107 PropertyImplStrategy strategy(CGM, propImpl);
1146 if (UseOptimizedSetter(CGM)) {
1149 CGM.getObjCRuntime()
1153 CGM.ErrorUnsupported(propImpl, "Obj-C optimized setter - NYI");
1158 setPropertyFn = CGM.getObjCRuntime().GetPropertySetFunction();
1160 CGM.ErrorUnsupported(propImpl, "Obj-C setter requiring atomic copy");
1352 MD->createImplicitParams(CGM.getContext(), IMP->getClassInterface());
1374 CodeGenTypes &Types = CGM.getTypes();
1375 QualType IdTy(CGM.getContext().getObjCIdType());
1396 if (CGM.getLangOpts().getGC() == LangOptions::NonGC)
1420 CGM.getObjCRuntime().EnumerationMutationFunction();
1423 CGM.ErrorUnsupported(&S, "Obj-C fast enumeration for this runtime");
1439 QualType StateTy = CGM.getObjCFastEnumerationStateType();
1448 &CGM.getContext().Idents.get("countByEnumeratingWithState"),
1449 &CGM.getContext().Idents.get("objects"),
1450 &CGM.getContext().Idents.get("count")
1453 CGM.getContext().Selectors.getSelector(llvm::array_lengthof(II), &II[0]);
1496 CGM.getObjCRuntime().GenerateMessageSend(*this, ReturnValueSlot(),
1563 EmitCall(CGM.getTypes().arrangeFreeFunctionCall(getContext().VoidTy, Args2,
1658 CGM.getObjCRuntime().GenerateMessageSend(*this, ReturnValueSlot(),
1695 CGM.getObjCRuntime().EmitTryStmt(*this, S);
1699 CGM.getObjCRuntime().EmitThrowStmt(*this, S);
1704 CGM.getObjCRuntime().EmitSynchronizedStmt(*this, S);
1744 llvm::Constant *&fn = CGM.getARCEntrypoints().clang_arc_use;
1747 llvm::FunctionType::get(CGM.VoidTy, ArrayRef<llvm::Type*>(), true);
1748 fn = CGM.CreateRuntimeFunction(fnType, "clang.arc.use");
1757 static llvm::Constant *createARCRuntimeFunction(CodeGenModule &CGM,
1760 llvm::Constant *fn = CGM.CreateRuntimeFunction(type, fnName);
1766 if (!CGM.getLangOpts().ObjCRuntime.hasNativeARC()) {
1791 fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
1816 fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
1850 fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
1880 fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
1904 CGM.getARCEntrypoints().objc_retain,
1918 CGM.getARCEntrypoints().objc_retainBlock,
1928 assert(call->getCalledValue() == CGM.getARCEntrypoints().objc_retainBlock);
1948 = CGM.getARCEntrypoints().retainAutoreleasedReturnValueMarker;
1951 = CGM.getTargetCodeGenInfo()
1959 } else if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
1970 CGM.getModule().getOrInsertNamedMetadata(
1984 CGM.getARCEntrypoints().objc_retainAutoreleasedReturnValue,
1994 llvm::Constant *&fn = CGM.getARCEntrypoints().objc_release;
1998 fn = createARCRuntimeFunction(CGM, fnType, "objc_release");
2025 if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
2045 llvm::Constant *&fn = CGM.getARCEntrypoints().objc_storeStrong;
2050 fn = createARCRuntimeFunction(CGM, fnType, "objc_storeStrong");
2103 CGM.getARCEntrypoints().objc_autorelease,
2112 CGM.getARCEntrypoints().objc_autoreleaseReturnValue,
2122 CGM.getARCEntrypoints().objc_retainAutoreleaseReturnValue,
2151 CGM.getARCEntrypoints().objc_retainAutorelease,
2159 CGM.getARCEntrypoints().objc_loadWeak,
2166 CGM.getARCEntrypoints().objc_loadWeakRetained,
2176 CGM.getARCEntrypoints().objc_storeWeak,
2190 CGM.getCodeGenOpts().OptimizationLevel == 0) {
2196 CGM.getARCEntrypoints().objc_initWeak,
2203 llvm::Constant *&fn = CGM.getARCEntrypoints().objc_destroyWeak;
2207 fn = createARCRuntimeFunction(CGM, fnType, "objc_destroyWeak");
2221 CGM.getARCEntrypoints().objc_moveWeak,
2230 CGM.getARCEntrypoints().objc_copyWeak,
2237 llvm::Constant *&fn = CGM.getRREntrypoints().objc_autoreleasePoolPush;
2241 fn = createARCRuntimeFunction(CGM, fnType, "objc_autoreleasePoolPush");
2252 llvm::Constant *&fn = CGM.getRREntrypoints().objc_autoreleasePoolPop;
2259 fn = createARCRuntimeFunction(CGM, fnType, "objc_autoreleasePoolPop");
2272 CGObjCRuntime &Runtime = CGM.getObjCRuntime();
2275 IdentifierInfo *II = &CGM.getContext().Idents.get("alloc");
2285 II = &CGM.getContext().Idents.get("init");
2297 IdentifierInfo *II = &CGM.getContext().Idents.get("drain");
2300 CGM.getObjCRuntime().GenerateMessageSend(*this, ReturnValueSlot(),
2344 if (CGM.getLangOpts().ObjCAutoRefCount)
2819 if (CGM.getLangOpts().ObjCRuntime.hasNativeARC()) {
2871 if ((HelperFn = CGM.getAtomicSetterHelperFnMap(Ty)))
2876 = &CGM.getContext().Idents.get("__assign_helper_atomic_property_");
2897 CGM.getTypes().arrangeFunctionDeclaration(C.VoidTy, args,
2901 llvm::FunctionType *LTy = CGM.getTypes().GetFunctionType(FI);
2906 &CGM.getModule());
2933 CGM.setAtomicSetterHelperFnMap(Ty, HelperFn);
2954 if ((HelperFn = CGM.getAtomicGetterHelperFnMap(Ty)))
2960 = &CGM.getContext().Idents.get("__copy_helper_atomic_property_");
2981 CGM.getTypes().arrangeFunctionDeclaration(C.VoidTy, args,
2985 llvm::FunctionType *LTy = CGM.getTypes().GetFunctionType(FI);
2989 "__copy_helper_atomic_property_", &CGM.getModule());
3039 CGM.setAtomicGetterHelperFnMap(Ty, HelperFn);
3054 CGObjCRuntime &Runtime = CGM.getObjCRuntime();