• Home
  • Raw
  • Download

Lines Matching refs:CGF

53 LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF,  in EmitValueForIvarAtOffset()  argument
62 CGF.CGM.getContext().getObjCObjectPointerType(InterfaceTy); in EmitValueForIvarAtOffset()
65 llvm::Type *LTy = CGF.CGM.getTypes().ConvertTypeForMem(IvarTy); in EmitValueForIvarAtOffset()
66 llvm::Value *V = CGF.Builder.CreateBitCast(BaseValue, CGF.Int8PtrTy); in EmitValueForIvarAtOffset()
67 V = CGF.Builder.CreateInBoundsGEP(V, Offset, "add.ptr"); in EmitValueForIvarAtOffset()
70 V = CGF.Builder.CreateBitCast(V, llvm::PointerType::getUnqual(LTy)); in EmitValueForIvarAtOffset()
71 LValue LV = CGF.MakeNaturalAlignAddrLValue(V, IvarTy); in EmitValueForIvarAtOffset()
90 CGF.CGM.getContext().lookupFieldBitOffset(OID, nullptr, Ivar); in EmitValueForIvarAtOffset()
91 uint64_t BitOffset = FieldBitOffset % CGF.CGM.getContext().getCharWidth(); in EmitValueForIvarAtOffset()
92 uint64_t AlignmentBits = CGF.CGM.getTarget().getCharAlign(); in EmitValueForIvarAtOffset()
93 uint64_t BitFieldSize = Ivar->getBitWidthValue(CGF.getContext()); in EmitValueForIvarAtOffset()
94 CharUnits StorageSize = CGF.CGM.getContext().toCharUnitsFromBits( in EmitValueForIvarAtOffset()
96 CharUnits Alignment = CGF.CGM.getContext().toCharUnitsFromBits(AlignmentBits); in EmitValueForIvarAtOffset()
104 CGBitFieldInfo *Info = new (CGF.CGM.getContext()) CGBitFieldInfo( in EmitValueForIvarAtOffset()
105 CGBitFieldInfo::MakeInfo(CGF.CGM.getTypes(), Ivar, BitOffset, BitFieldSize, in EmitValueForIvarAtOffset()
106 CGF.CGM.getContext().toBits(StorageSize), in EmitValueForIvarAtOffset()
110 Addr = CGF.Builder.CreateElementBitCast(Addr, in EmitValueForIvarAtOffset()
111 llvm::Type::getIntNTy(CGF.getLLVMContext(), in EmitValueForIvarAtOffset()
134 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit()
136 CGF.EmitRuntimeCallOrInvoke(Fn); in Emit()
138 CGF.EmitNounwindRuntimeCall(Fn); in Emit()
143 void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF, in EmitTryCatchStmt() argument
151 Cont = CGF.getJumpDestInCurrentScope("eh.cont"); in EmitTryCatchStmt()
153 bool useFunclets = EHPersonality::get(CGF).usesFuncletPads(); in EmitTryCatchStmt()
158 FinallyInfo.enter(CGF, Finally->getFinallyBody(), in EmitTryCatchStmt()
174 Handler.Block = CGF.createBasicBlock("catch"); in EmitTryCatchStmt()
189 EHCatchScope *Catch = CGF.EHStack.pushCatch(Handlers.size()); in EmitTryCatchStmt()
197 if (!CGF.CurSEHParent) in EmitTryCatchStmt()
198 CGF.CurSEHParent = cast<NamedDecl>(CGF.CurFuncDecl); in EmitTryCatchStmt()
201 HelperCGF.startOutlinedSEHHelper(CGF, /*isFilter*/false, FinallyBlock); in EmitTryCatchStmt()
212 CGF.pushSEHCleanup(NormalAndEHCleanup, FinallyFunc); in EmitTryCatchStmt()
217 CGF.EmitStmt(S.getTryBody()); in EmitTryCatchStmt()
221 CGF.popCatchScope(); in EmitTryCatchStmt()
224 CGBuilderTy::InsertPoint SavedIP = CGF.Builder.saveAndClearIP(); in EmitTryCatchStmt()
230 CGF.EmitBlock(Handler.Block); in EmitTryCatchStmt()
232 SaveAndRestore<llvm::Instruction *> RestoreCurrentFuncletPad(CGF.CurrentFuncletPad); in EmitTryCatchStmt()
235 CGF.CurrentFuncletPad = CPI; in EmitTryCatchStmt()
236 CPI->setOperand(2, CGF.getExceptionSlot().getPointer()); in EmitTryCatchStmt()
238 llvm::Value *RawExn = CGF.getExceptionFromSlot(); in EmitTryCatchStmt()
243 Exn = CGF.EmitNounwindRuntimeCall(beginCatchFn, RawExn, "exn.adjusted"); in EmitTryCatchStmt()
245 CodeGenFunction::LexicalScope cleanups(CGF, Handler.Body->getSourceRange()); in EmitTryCatchStmt()
251 CGF.EHStack.pushCleanup<CallObjCEndCatch>(NormalAndEHCleanup, in EmitTryCatchStmt()
258 llvm::Type *CatchType = CGF.ConvertType(CatchParam->getType()); in EmitTryCatchStmt()
259 llvm::Value *CastExn = CGF.Builder.CreateBitCast(Exn, CatchType); in EmitTryCatchStmt()
261 CGF.EmitAutoVarDecl(*CatchParam); in EmitTryCatchStmt()
262 EmitInitOfCatchParam(CGF, CastExn, CatchParam); in EmitTryCatchStmt()
265 CGF.EHStack.pushCleanup<CatchRetScope>(NormalCleanup, CPI); in EmitTryCatchStmt()
267 CGF.ObjCEHValueStack.push_back(Exn); in EmitTryCatchStmt()
268 CGF.EmitStmt(Handler.Body); in EmitTryCatchStmt()
269 CGF.ObjCEHValueStack.pop_back(); in EmitTryCatchStmt()
274 CGF.EmitBranchThroughCleanup(Cont); in EmitTryCatchStmt()
278 CGF.Builder.restoreIP(SavedIP); in EmitTryCatchStmt()
282 FinallyInfo.exit(CGF); in EmitTryCatchStmt()
285 CGF.EmitBlock(Cont.getBlock()); in EmitTryCatchStmt()
288 void CGObjCRuntime::EmitInitOfCatchParam(CodeGenFunction &CGF, in EmitInitOfCatchParam() argument
292 Address paramAddr = CGF.GetAddrOfLocalVar(paramDecl); in EmitInitOfCatchParam()
296 exn = CGF.EmitARCRetainNonBlock(exn); in EmitInitOfCatchParam()
302 CGF.Builder.CreateStore(exn, paramAddr); in EmitInitOfCatchParam()
306 CGF.EmitARCInitWeak(paramAddr, exn); in EmitInitOfCatchParam()
319 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit()
320 CGF.EmitNounwindRuntimeCall(SyncExitFn, SyncArg); in Emit()
325 void CGObjCRuntime::EmitAtSynchronizedStmt(CodeGenFunction &CGF, in EmitAtSynchronizedStmt() argument
329 CodeGenFunction::RunCleanupsScope cleanups(CGF); in EmitAtSynchronizedStmt()
335 if (CGF.getLangOpts().ObjCAutoRefCount) { in EmitAtSynchronizedStmt()
336 lock = CGF.EmitARCRetainScalarExpr(lockExpr); in EmitAtSynchronizedStmt()
337 lock = CGF.EmitObjCConsumeObject(lockExpr->getType(), lock); in EmitAtSynchronizedStmt()
339 lock = CGF.EmitScalarExpr(lockExpr); in EmitAtSynchronizedStmt()
341 lock = CGF.Builder.CreateBitCast(lock, CGF.VoidPtrTy); in EmitAtSynchronizedStmt()
344 CGF.Builder.CreateCall(syncEnterFn, lock)->setDoesNotThrow(); in EmitAtSynchronizedStmt()
347 CGF.EHStack.pushCleanup<CallSyncExit>(NormalAndEHCleanup, syncExitFn, lock); in EmitAtSynchronizedStmt()
350 CGF.EmitStmt(S.getSynchBody()); in EmitAtSynchronizedStmt()