Lines Matching refs:CGM
32 static llvm::Constant *getFreeExceptionFn(CodeGenModule &CGM) { in getFreeExceptionFn() argument
36 llvm::FunctionType::get(CGM.VoidTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); in getFreeExceptionFn()
38 return CGM.CreateRuntimeFunction(FTy, "__cxa_free_exception"); in getFreeExceptionFn()
41 static llvm::Constant *getUnexpectedFn(CodeGenModule &CGM) { in getUnexpectedFn() argument
45 llvm::FunctionType::get(CGM.VoidTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); in getUnexpectedFn()
47 return CGM.CreateRuntimeFunction(FTy, "__cxa_call_unexpected"); in getUnexpectedFn()
76 static llvm::Constant *getCatchallRethrowFn(CodeGenModule &CGM, in getCatchallRethrowFn() argument
79 llvm::FunctionType::get(CGM.VoidTy, CGM.Int8PtrTy, /*IsVarArgs=*/false); in getCatchallRethrowFn()
81 return CGM.CreateRuntimeFunction(FTy, Name); in getCatchallRethrowFn()
189 const EHPersonality &EHPersonality::get(CodeGenModule &CGM, in get() argument
191 const llvm::Triple &T = CGM.getTarget().getTriple(); in get()
192 const LangOptions &L = CGM.getLangOpts(); in get()
219 return get(CGF.CGM, dyn_cast_or_null<FunctionDecl>(CGF.CurCodeDecl)); in get()
222 static llvm::Constant *getPersonalityFn(CodeGenModule &CGM, in getPersonalityFn() argument
225 CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty, true), in getPersonalityFn()
230 static llvm::Constant *getOpaquePersonalityFn(CodeGenModule &CGM, in getOpaquePersonalityFn() argument
232 llvm::Constant *Fn = getPersonalityFn(CGM, Personality); in getOpaquePersonalityFn()
233 return llvm::ConstantExpr::getBitCast(Fn, CGM.Int8PtrTy); in getOpaquePersonalityFn()
348 CGF.EmitNounwindRuntimeCall(getFreeExceptionFn(CGF.CGM), exn); in Emit()
410 CGM.getObjCRuntime().EmitThrowStmt(*this, S, false); in EmitCXXThrowExpr()
412 CGM.getCXXABI().emitThrow(*this, E); in EmitCXXThrowExpr()
415 CGM.getCXXABI().emitRethrow(*this, /*isNoReturn=*/true); in EmitCXXThrowExpr()
425 if (!CGM.getLangOpts().CXXExceptions) in EmitStartEHSpec()
458 llvm::Value *EHType = CGM.GetAddrOfRTTIDescriptor(ExceptType, in EmitStartEHSpec()
498 CGF.EmitRuntimeCall(getUnexpectedFn(CGF.CGM), exn) in emitFilterDispatchBlock()
504 if (!CGM.getLangOpts().CXXExceptions) in EmitEndEHSpec()
558 QualType CaughtType = CGM.getContext().getUnqualifiedArrayType( in EnterCXXTryStmt()
563 TypeInfo.RTTI = CGM.getObjCRuntime().GetEHType(CaughtType); in EnterCXXTryStmt()
565 TypeInfo = CGM.getCXXABI().getAddrOfCXXCatchHandlerType( in EnterCXXTryStmt()
570 CatchScope->setHandler(I, CGM.getCXXABI().getCatchAllTypeInfo(), Handler); in EnterCXXTryStmt()
693 const LangOptions &LO = CGM.getLangOpts(); in getInvokeDestImpl()
709 CurFn->setPersonalityFn(getOpaquePersonalityFn(CGM, Personality)); in getInvokeDestImpl()
939 CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_typeid_for); in emitCatchDispatchBlock()
1060 CGM.getCXXABI().emitBeginCatch(*this, C); in ExitCXXTryStmt()
1078 CGM.getCXXABI().emitRethrow(*this, /*isNoReturn*/false); in ExitCXXTryStmt()
1300 CurFn->setPersonalityFn(getOpaquePersonalityFn(CGM, Personality)); in getTerminateLandingPad()
1310 CGM.getCXXABI().emitTerminateForUnexpectedException(*this, Exn); in getTerminateLandingPad()
1336 ParentPad = llvm::ConstantTokenNone::get(CGM.getLLVMContext()); in getTerminateHandler()
1343 CGM.getCXXABI().emitTerminateForUnexpectedException(*this, Exn); in getTerminateHandler()
1368 EmitRuntimeCall(getCatchallRethrowFn(CGM, RethrowName), in getEHResumeBlock()
1415 CodeGenModule &CGM = CGF.CGM; in Emit() local
1421 llvm::Value *LocalAddrFn = CGM.getIntrinsic(llvm::Intrinsic::localaddress); in Emit()
1430 CGM.getTypes().arrangeBuiltinFunctionCall(Context.VoidTy, Args); in Emit()
1509 &CGM.getModule(), llvm::Intrinsic::localrecover); in recoverAddrOfEscapedLocal()
1546 CGM.getTarget().getTriple().getArch() != llvm::Triple::x86) { in EmitCapturedLocals()
1553 CGBuilderTy Builder(CGM, AllocaInsertPt); in EmitCapturedLocals()
1554 if (IsFilter && CGM.getTarget().getTriple().getArch() == llvm::Triple::x86) { in EmitCapturedLocals()
1559 CGM.getIntrinsic(llvm::Intrinsic::frameaddress), {Builder.getInt32(1)}); in EmitCapturedLocals()
1574 CGM.getIntrinsic(llvm::Intrinsic::x86_seh_recoverfp); in EmitCapturedLocals()
1583 CGM.ErrorUnsupported(VD, "'this' captured by SEH"); in EmitCapturedLocals()
1588 CGM.ErrorUnsupported(VD, "VLA captured by SEH"); in EmitCapturedLocals()
1628 MangleContext &Mangler = CGM.getCXXABI().getMangleContext(); in startOutlinedSEHHelper()
1636 if (CGM.getTarget().getTriple().getArch() != llvm::Triple::x86 || !IsFilter) { in startOutlinedSEHHelper()
1659 CGM.getTypes().arrangeBuiltinFunctionDeclaration(RetTy, Args); in startOutlinedSEHHelper()
1661 llvm::FunctionType *FnTy = CGM.getTypes().GetFunctionType(FnInfo); in startOutlinedSEHHelper()
1663 FnTy, llvm::GlobalValue::InternalLinkage, Name.str(), &CGM.getModule()); in startOutlinedSEHHelper()
1668 llvm::Comdat *C = CGM.getModule().getOrInsertComdat(ParentFn->getName()); in startOutlinedSEHHelper()
1681 CGM.SetLLVMFunctionAttributes(nullptr, FnInfo, CurFn); in startOutlinedSEHHelper()
1724 if (CGM.getTarget().getTriple().getArch() != llvm::Triple::x86) { in EmitSEHExceptionCodeSave()
1748 llvm::Type *RecordTy = CGM.Int32Ty->getPointerTo(); in EmitSEHExceptionCodeSave()
1749 llvm::Type *PtrsTy = llvm::StructType::get(RecordTy, CGM.VoidPtrTy, nullptr); in EmitSEHExceptionCodeSave()
1780 CodeGenFunction HelperCGF(CGM, /*suppressNewContext=*/true); in EnterSEHTryStmt()
1802 CGM.EmitConstantExpr(Except->getFilterExpr(), getContext().IntTy, this); in EnterSEHTryStmt()
1803 if (CGM.getTarget().getTriple().getArch() != llvm::Triple::x86 && C && in EnterSEHTryStmt()
1865 if (CGM.getTarget().getTriple().getArch() != llvm::Triple::x86) { in ExitSEHTryStmt()
1867 CGM.getIntrinsic(llvm::Intrinsic::eh_exceptioncode); in ExitSEHTryStmt()