Lines Matching full:cgf
115 void emitVirtualObjectDelete(CodeGenFunction &CGF, const CXXDeleteExpr *DE,
119 void emitRethrow(CodeGenFunction &CGF, bool isNoReturn) override;
120 void emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) override;
122 void emitBeginCatch(CodeGenFunction &CGF, const CXXCatchStmt *C) override;
137 void EmitBadTypeidCall(CodeGenFunction &CGF) override;
138 llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy,
145 llvm::Value *EmitDynamicCastCall(CodeGenFunction &CGF, Address Value,
150 llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF, Address Value,
154 bool EmitBadCastCall(CodeGenFunction &CGF) override;
160 GetVirtualBaseClassOffset(CodeGenFunction &CGF, Address This,
165 EmitCtorCompleteObjectHandler(CodeGenFunction &CGF,
168 void initializeHiddenVirtualInheritanceMembers(CodeGenFunction &CGF,
235 adjustThisArgumentForVirtualFunctionCall(CodeGenFunction &CGF, GlobalDecl GD,
239 void addImplicitStructorParams(CodeGenFunction &CGF, QualType &ResTy,
243 CodeGenFunction &CGF, GlobalDecl GD, llvm::Value *This) override;
245 void EmitInstanceFunctionProlog(CodeGenFunction &CGF) override;
247 unsigned addImplicitConstructorArgs(CodeGenFunction &CGF,
253 void EmitDestructorCall(CodeGenFunction &CGF, const CXXDestructorDecl *DD,
263 bool isVirtualOffsetNeededForVTableField(CodeGenFunction &CGF,
277 CodeGenFunction &CGF, const CXXRecordDecl *VTableClass,
287 llvm::Value *getVirtualFunctionPointer(CodeGenFunction &CGF, GlobalDecl GD,
291 llvm::Value *EmitVirtualDestructorCall(CodeGenFunction &CGF,
297 void adjustCallArgsForDestructorThunk(CodeGenFunction &CGF, GlobalDecl GD,
301 CallArgs.add(RValue::get(getStructorImplicitParamValue(CGF)),
373 llvm::Value *performThisAdjustment(CodeGenFunction &CGF, Address This,
376 llvm::Value *performReturnAdjustment(CodeGenFunction &CGF, Address Ret,
385 LValue EmitThreadLocalVarDeclLValue(CodeGenFunction &CGF, const VarDecl *VD,
388 void EmitGuardedInit(CodeGenFunction &CGF, const VarDecl &D,
391 void registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D,
421 Address InitializeArrayCookie(CodeGenFunction &CGF,
426 llvm::Value *readArrayCookieImpl(CodeGenFunction &CGF,
563 llvm::Value *GetVBaseOffsetFromVBPtr(CodeGenFunction &CGF,
569 llvm::Value *GetVBaseOffsetFromVBPtr(CodeGenFunction &CGF,
577 return GetVBaseOffsetFromVBPtr(CGF, Base, VBPOffset, VBTOffset, VBPtr);
581 performBaseAdjustment(CodeGenFunction &CGF, Address Value,
586 llvm::Value *AdjustVirtualBase(CodeGenFunction &CGF, const Expr *E,
603 void EmitVBPtrStores(CodeGenFunction &CGF, const CXXRecordDecl *RD);
630 llvm::Value *EmitMemberPointerComparison(CodeGenFunction &CGF,
636 llvm::Value *EmitMemberPointerIsNotNull(CodeGenFunction &CGF,
641 EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E,
651 llvm::Value *EmitMemberPointerConversion(CodeGenFunction &CGF,
664 EmitLoadOfMemberFunctionPointer(CodeGenFunction &CGF, const Expr *E,
851 void MicrosoftCXXABI::emitVirtualObjectDelete(CodeGenFunction &CGF,
861 EmitVirtualDestructorCall(CGF, Dtor, DtorType, Ptr, /*CE=*/nullptr);
863 CGF.EmitDeleteCall(DE->getOperatorDelete(), MDThis, ElementType);
866 void MicrosoftCXXABI::emitRethrow(CodeGenFunction &CGF, bool isNoReturn) {
872 CGF.EmitNoreturnRuntimeCallOrInvoke(Fn, Args);
874 CGF.EmitRuntimeCallOrInvoke(Fn, Args);
883 void Emit(CodeGenFunction &CGF, Flags flags) override {
884 llvm::BasicBlock *BB = CGF.createBasicBlock("catchret.dest");
885 CGF.Builder.CreateCatchRet(CPI, BB);
886 CGF.EmitBlock(BB);
891 void MicrosoftCXXABI::emitBeginCatch(CodeGenFunction &CGF,
896 llvm::BasicBlock *CatchPadBB = CGF.Builder.GetInsertBlock();
899 CGF.CurrentFuncletPad = CPI;
904 CGF.EHStack.pushCleanup<CatchRetScope>(NormalCleanup, CPI);
908 CodeGenFunction::AutoVarEmission var = CGF.EmitAutoVarAlloca(*CatchParam);
909 CPI->setArgOperand(2, var.getObjectAddress(CGF).getPointer());
910 CGF.EHStack.pushCleanup<CatchRetScope>(NormalCleanup, CPI);
911 CGF.EmitAutoVarCleanups(var);
918 MicrosoftCXXABI::performBaseAdjustment(CodeGenFunction &CGF, Address Value,
920 Value = CGF.Builder.CreateBitCast(Value, CGF.Int8PtrTy);
928 return std::make_pair(Value, llvm::ConstantInt::get(CGF.Int32Ty, 0));
943 GetVirtualBaseClassOffset(CGF, Value, SrcDecl, PolymorphicBase);
944 llvm::Value *Ptr = CGF.Builder.CreateInBoundsGEP(Value.getPointer(), Offset);
946 CGF.CGM.getVBaseAlignment(Value.getAlignment(), SrcDecl, PolymorphicBase);
957 static llvm::CallSite emitRTtypeidCall(CodeGenFunction &CGF,
959 llvm::Type *ArgTypes[] = {CGF.Int8PtrTy};
961 llvm::FunctionType::get(CGF.Int8PtrTy, ArgTypes, false);
963 llvm::Constant *Fn = CGF.CGM.CreateRuntimeFunction(FTy, "__RTtypeid");
964 return CGF.EmitRuntimeCallOrInvoke(Fn, Args);
967 void MicrosoftCXXABI::EmitBadTypeidCall(CodeGenFunction &CGF) {
969 emitRTtypeidCall(CGF, llvm::Constant::getNullValue(CGM.VoidPtrTy));
971 CGF.Builder.CreateUnreachable();
974 llvm::Value *MicrosoftCXXABI::EmitTypeid(CodeGenFunction &CGF,
979 performBaseAdjustment(CGF, ThisPtr, SrcRecordTy);
980 auto Typeid = emitRTtypeidCall(CGF, ThisPtr.getPointer()).getInstruction();
981 return CGF.Builder.CreateBitCast(Typeid, StdTypeInfoPtrTy);
992 CodeGenFunction &CGF, Address This, QualType SrcRecordTy,
994 llvm::Type *DestLTy = CGF.ConvertType(DestTy);
997 CGF.CGM.GetAddrOfRTTIDescriptor(SrcRecordTy.getUnqualifiedType());
999 CGF.CGM.GetAddrOfRTTIDescriptor(DestRecordTy.getUnqualifiedType());
1002 std::tie(This, Offset) = performBaseAdjustment(CGF, This, SrcRecordTy);
1004 Offset = CGF.Builder.CreateTrunc(Offset, CGF.Int32Ty);
1012 llvm::Type *ArgTypes[] = {CGF.Int8PtrTy, CGF.Int32Ty, CGF.Int8PtrTy,
1013 CGF.Int8PtrTy, CGF.Int32Ty};
1014 llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction(
1015 llvm::FunctionType::get(CGF.Int8PtrTy, ArgTypes, false),
1019 llvm::ConstantInt::get(CGF.Int32Ty, DestTy->isReferenceType())};
1020 ThisPtr = CGF.EmitRuntimeCallOrInvoke(Function, Args).getInstruction();
1021 return CGF.Builder.CreateBitCast(ThisPtr, DestLTy);
1025 MicrosoftCXXABI::EmitDynamicCastToVoid(CodeGenFunction &CGF, Address Value,
1028 std::tie(Value, std::ignore) = performBaseAdjustment(CGF, Value, SrcRecordTy);
1032 llvm::Type *ArgTypes[] = {CGF.Int8PtrTy};
1033 llvm::Constant *Function = CGF.CGM.CreateRuntimeFunction(
1034 llvm::FunctionType::get(CGF.Int8PtrTy, ArgTypes, false),
1037 return CGF.EmitRuntimeCall(Function, Args);
1040 bool MicrosoftCXXABI::EmitBadCastCall(CodeGenFunction &CGF) {
1045 CodeGenFunction &CGF, Address This, const CXXRecordDecl *ClassDecl,
1059 GetVBaseOffsetFromVBPtr(CGF, This, VBPtrOffset, VBTableOffset);
1061 CGF.Builder.CreateSExtOrBitCast(VBPtrToNewBase, CGM.PtrDiffTy);
1062 return CGF.Builder.CreateNSWAdd(VBPtrOffset, VBPtrToNewBase);
1101 MicrosoftCXXABI::EmitCtorCompleteObjectHandler(CodeGenFunction &CGF,
1103 llvm::Value *IsMostDerivedClass = getStructorImplicitParamValue(CGF);
1107 CGF.Builder.CreateIsNotNull(IsMostDerivedClass, "is_complete_object");
1109 llvm::BasicBlock *CallVbaseCtorsBB = CGF.createBasicBlock("ctor.init_vbases");
1110 llvm::BasicBlock *SkipVbaseCtorsBB = CGF.createBasicBlock("ctor.skip_vbases");
1111 CGF.Builder.CreateCondBr(IsCompleteObject,
1114 CGF.EmitBlock(CallVbaseCtorsBB);
1117 EmitVBPtrStores(CGF, RD);
1119 // CGF will put the base ctor calls in this basic block for us later.
1125 CodeGenFunction &CGF, const CXXRecordDecl *RD) {
1142 CGBuilderTy &Builder = CGF.Builder;
1144 unsigned AS = getThisAddress(CGF).getAddressSpace();
1153 GetVirtualBaseClassOffset(CGF, getThisAddress(CGF), RD, I->first);
1161 VtorDispValue = Builder.CreateTruncOrBitCast(VtorDispValue, CGF.Int32Ty);
1164 Int8This = Builder.CreateBitCast(getThisValue(CGF),
1165 CGF.Int8Ty->getPointerTo(AS));
1170 VtorDispPtr, CGF.Int32Ty->getPointerTo(AS), "vtordisp.ptr");
1202 void MicrosoftCXXABI::EmitVBPtrStores(CodeGenFunction &CGF,
1204 Address This = getThisAddress(CGF);
1205 This = CGF.Builder.CreateElementBitCast(This, CGM.Int8Ty, "this.int8");
1219 Address VBPtr = CGF.Builder.CreateConstInBoundsByteGEP(This, Offs);
1221 CGF.Builder.CreateConstInBoundsGEP2_32(GV->getValueType(), GV, 0, 0);
1222 VBPtr = CGF.Builder.CreateElementBitCast(VBPtr, GVPtr->getType(),
1224 CGF.Builder.CreateStore(GVPtr, VBPtr);
1297 CodeGenFunction &CGF, GlobalDecl GD, Address This,
1306 This = CGF.Builder.CreateElementBitCast(This, CGF.Int8Ty);
1308 return CGF.Builder.CreateConstByteGEP(This, Adjustment);
1338 Result = CGF.Builder.CreateElementBitCast(Result, CGF.Int8Ty);
1343 GetVirtualBaseClassOffset(CGF, Result, Derived, VBase);
1345 CGF.Builder.CreateInBoundsGEP(Result.getPointer(), VBaseOffset);
1347 CGF.CGM.getVBaseAlignment(Result.getAlignment(), Derived, VBase);
1352 Result = CGF.Builder.CreateElementBitCast(Result, CGF.Int8Ty);
1358 Result = CGF.Builder.CreateConstByteGEP(Result, StaticOffset);
1360 Result = CGF.Builder.CreateConstInBoundsByteGEP(Result, StaticOffset);
1366 void MicrosoftCXXABI::addImplicitStructorParams(CodeGenFunction &CGF,
1370 const CXXMethodDecl *MD = cast<CXXMethodDecl>(CGF.CurGD.getDecl());
1375 CGF.CurGD.getDecl()->getLocation(),
1385 getStructorImplicitParamDecl(CGF) = IsMostDerived;
1386 } else if (isDeletingDtor(CGF.CurGD)) {
1389 CGF.CurGD.getDecl()->getLocation(),
1393 getStructorImplicitParamDecl(CGF) = ShouldDelete;
1398 CodeGenFunction &CGF, GlobalDecl GD, llvm::Value *This) {
1409 llvm::Type *charPtrTy = CGF.Int8Ty->getPointerTo(AS),
1412 This = CGF.Builder.CreateBitCast(This, charPtrTy);
1414 This = CGF.Builder.CreateConstInBoundsGEP1_32(CGF.Int8Ty, This,
1416 return CGF.Builder.CreateBitCast(This, thisTy);
1419 void MicrosoftCXXABI::EmitInstanceFunctionProlog(CodeGenFunction &CGF) {
1420 EmitThisParam(CGF);
1430 if (HasThisReturn(CGF.CurGD))
1431 CGF.Builder.CreateStore(getThisValue(CGF), CGF.ReturnValue);
1432 else if (hasMostDerivedReturn(CGF.CurGD))
1433 CGF.Builder.CreateStore(CGF.EmitCastToVoidPtr(getThisValue(CGF)),
1434 CGF.ReturnValue);
1436 const CXXMethodDecl *MD = cast<CXXMethodDecl>(CGF.CurGD.getDecl());
1438 assert(getStructorImplicitParamDecl(CGF) &&
1440 getStructorImplicitParamValue(CGF)
1441 = CGF.Builder.CreateLoad(
1442 CGF.GetAddrOfLocalVar(getStructorImplicitParamDecl(CGF)),
1446 if (isDeletingDtor(CGF.CurGD)) {
1447 assert(getStructorImplicitParamDecl(CGF) &&
1449 getStructorImplicitParamValue(CGF)
1450 = CGF.Builder.CreateLoad(
1451 CGF.GetAddrOfLocalVar(getStructorImplicitParamDecl(CGF)),
1457 CodeGenFunction &CGF, const CXXConstructorDecl *D, CXXCtorType Type,
1469 MostDerivedArg = getStructorImplicitParamValue(CGF);
1483 void MicrosoftCXXABI::EmitDestructorCall(CodeGenFunction &CGF,
1492 This = adjustThisArgumentForVirtualFunctionCall(CGF, GlobalDecl(DD, Type),
1496 CGF.EmitCXXDestructorCall(DD, Callee, This.getPointer(),
1580 CodeGenFunction &CGF, CodeGenFunction::VPtr Vptr) {
1585 CodeGenFunction &CGF, const CXXRecordDecl *VTableClass, BaseSubobject Base,
1798 llvm::Value *MicrosoftCXXABI::getVirtualFunctionPointer(CodeGenFunction &CGF,
1804 CGBuilderTy &Builder = CGF.Builder;
1808 adjustThisArgumentForVirtualFunctionCall(CGF, GD, This, true);
1811 llvm::Value *VTable = CGF.GetVTablePtr(VPtr, Ty, MethodDecl->getParent());
1816 if (CGF.ShouldEmitVTableTypeCheckedLoad(MethodDecl->getParent())) {
1817 return CGF.EmitVTableTypeCheckedLoad(
1822 CGF.EmitTypeMetadataCodeForVCall(
1827 return Builder.CreateAlignedLoad(VFuncPtr, CGF.getPointerAlign());
1832 CodeGenFunction &CGF, const CXXDestructorDecl *Dtor, CXXDtorType DtorType,
1842 llvm::Type *Ty = CGF.CGM.getTypes().GetFunctionType(*FInfo);
1844 CGF, GD, This, Ty, CE ? CE->getLocStart() : SourceLocation());
1848 llvm::IntegerType::getInt32Ty(CGF.getLLVMContext()),
1851 This = adjustThisArgumentForVirtualFunctionCall(CGF, GD, This, true);
1853 CGF.EmitCXXDestructorCall(Dtor, Callee, This.getPointer(), ImplicitParam,
1927 CodeGenFunction CGF(CGM);
1928 CGF.CurGD = GlobalDecl(MD);
1929 CGF.CurFuncIsThunk = true;
1934 buildThisParam(CGF, FunctionArgs);
1937 CGF.StartFunction(GlobalDecl(), FnInfo.getReturnType(), ThunkFn, FnInfo,
1939 EmitThisParam(CGF);
1943 llvm::Value *VTable = CGF.GetVTablePtr(
1944 getThisAddress(CGF), ThunkTy->getPointerTo()->getPointerTo(), MD->getParent());
1947 CGF.Builder.CreateConstInBoundsGEP1_64(VTable, ML.Index, "vfn");
1949 CGF.Builder.CreateAlignedLoad(VFuncPtr, CGF.getPointerAlign());
1951 CGF.EmitMustTailThunk(MD, getThisValue(CGF), Callee);
2043 llvm::Value *MicrosoftCXXABI::performThisAdjustment(CodeGenFunction &CGF,
2049 This = CGF.Builder.CreateElementBitCast(This, CGF.Int8Ty);
2058 CGF.Builder.CreateConstInBoundsByteGEP(This,
2060 VtorDispPtr = CGF.Builder.CreateElementBitCast(VtorDispPtr, CGF.Int32Ty);
2061 llvm::Value *VtorDisp = CGF.Builder.CreateLoad(VtorDispPtr, "vtordisp");
2062 V = CGF.Builder.CreateGEP(This.getPointer(),
2063 CGF.Builder.CreateNeg(VtorDisp));
2077 GetVBaseOffsetFromVBPtr(CGF, Address(V, CGF.getPointerAlign()),
2080 V = CGF.Builder.CreateInBoundsGEP(VBPtr, VBaseOffset);
2088 V = CGF.Builder.CreateConstGEP1_32(V, TA.NonVirtual);
2096 MicrosoftCXXABI::performReturnAdjustment(CodeGenFunction &CGF, Address Ret,
2102 Ret = CGF.Builder.CreateElementBitCast(Ret, CGF.Int8Ty);
2107 int32_t IntSize = CGF.getIntSize().getQuantity();
2110 GetVBaseOffsetFromVBPtr(CGF, Ret, RA.Virtual.Microsoft.VBPtrOffset,
2112 V = CGF.Builder.CreateInBoundsGEP(VBPtr, VBaseOffset);
2116 V = CGF.Builder.CreateConstInBoundsGEP1_32(CGF.Int8Ty, V, RA.NonVirtual);
2119 return CGF.Builder.CreateBitCast(V, OrigTy);
2143 llvm::Value *MicrosoftCXXABI::readArrayCookieImpl(CodeGenFunction &CGF,
2147 CGF.Builder.CreateElementBitCast(allocPtr, CGF.SizeTy);
2148 return CGF.Builder.CreateLoad(numElementsPtr);
2151 Address MicrosoftCXXABI::InitializeArrayCookie(CodeGenFunction &CGF,
2166 = CGF.Builder.CreateElementBitCast(cookiePtr, CGF.SizeTy);
2167 CGF.Builder.CreateStore(numElements, numElementsPtr);
2171 return CGF.Builder.CreateConstInBoundsByteGEP(newPtr, cookieSize);
2174 static void emitGlobalDtorWithTLRegDtor(CodeGenFunction &CGF, const VarDecl &VD,
2178 llvm::Constant *DtorStub = CGF.createAtExitStub(VD, Dtor, Addr);
2182 CGF.IntTy, DtorStub->getType(), /*IsVarArg=*/false);
2185 CGF.CGM.CreateRuntimeFunction(TLRegDtorTy, "__tlregdtor");
2189 CGF.EmitNounwindRuntimeCall(TLRegDtor, DtorStub);
2192 void MicrosoftCXXABI::registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D,
2196 return emitGlobalDtorWithTLRegDtor(CGF, D, Dtor, Addr);
2199 CGF.registerGlobalDtorWithAtExit(D, Dtor, Addr);
2246 LValue MicrosoftCXXABI::EmitThreadLocalVarDeclLValue(CodeGenFunction &CGF,
2249 CGF.CGM.ErrorUnsupported(VD, "thread wrappers");
2307 void Emit(CodeGenFunction &CGF, Flags flags) override {
2310 CGBuilderTy &Builder = CGF.Builder;
2313 llvm::ConstantInt::get(CGF.IntTy, ~(1ULL << GuardNum));
2322 void Emit(CodeGenFunction &CGF, Flags flags) override {
2324 CGF.EmitNounwindRuntimeCall(getInitThreadAbortFn(CGF.CGM), Guard);
2329 void MicrosoftCXXABI::EmitGuardedInit(CodeGenFunction &CGF, const VarDecl &D,
2336 llvm::Function *F = CGF.CurFn;
2339 CGF.EmitCXXGlobalVarDeclInit(D, GV, PerformInit);
2350 CGBuilderTy &Builder = CGF.Builder;
2351 llvm::IntegerType *GuardTy = CGF.Int32Ty;
2379 ErrorUnsupportedABI(CGF, "more than 32 guarded initializations");
2430 llvm::BasicBlock *InitBlock = CGF.createBasicBlock("init");
2431 llvm::BasicBlock *EndBlock = CGF.createBasicBlock("init.end");
2436 CGF.EmitBlock(InitBlock);
2438 CGF.EHStack.pushCleanup<ResetGuardBit>(EHCleanup, GuardAddr, GuardNum);
2439 CGF.EmitCXXGlobalVarDeclInit(D, GV, PerformInit);
2440 CGF.PopCleanupBlock();
2444 CGF.EmitBlock(EndBlock);
2465 llvm::BasicBlock *AttemptInitBlock = CGF.createBasicBlock("init.attempt");
2466 llvm::BasicBlock *EndBlock = CGF.createBasicBlock("init.end");
2471 CGF.EmitBlock(AttemptInitBlock);
2472 CGF.EmitNounwindRuntimeCall(getInitThreadHeaderFn(CGM),
2478 llvm::BasicBlock *InitBlock = CGF.createBasicBlock("init");
2482 CGF.EmitBlock(InitBlock);
2483 CGF.EHStack.pushCleanup<CallInitThreadAbort>(EHCleanup, GuardAddr);
2484 CGF.EmitCXXGlobalVarDeclInit(D, GV, PerformInit);
2485 CGF.PopCleanupBlock();
2486 CGF.EmitNounwindRuntimeCall(getInitThreadFooterFn(CGM),
2490 CGF.EmitBlock(EndBlock);
2719 MicrosoftCXXABI::EmitMemberPointerComparison(CodeGenFunction &CGF,
2724 CGBuilderTy &Builder = CGF.Builder;
2779 MicrosoftCXXABI::EmitMemberPointerIsNotNull(CodeGenFunction &CGF,
2782 CGBuilderTy &Builder = CGF.Builder;
2841 MicrosoftCXXABI::GetVBaseOffsetFromVBPtr(CodeGenFunction &CGF,
2846 CGBuilderTy &Builder = CGF.Builder;
2860 VBPtrAlign = CGF.getPointerAlign();
2880 CodeGenFunction &CGF, const Expr *E, const CXXRecordDecl *RD,
2882 CGBuilderTy &Builder = CGF.Builder;
2894 VBaseAdjustBB = CGF.createBasicBlock("memptr.vadjust");
2895 SkipAdjustBB = CGF.createBasicBlock("memptr.skip_vadjust");
2900 CGF.EmitBlock(VBaseAdjustBB);
2908 DiagnosticsEngine &Diags = CGF.CGM.getDiags();
2920 GetVBaseOffsetFromVBPtr(CGF, Base, VBPtrOffset, VBTableOffset, &VBPtr);
2926 CGF.EmitBlock(SkipAdjustBB);
2936 CodeGenFunction &CGF, const Expr *E, Address Base, llvm::Value *MemPtr,
2941 CGF.ConvertTypeForMem(MPT->getPointeeType())->getPointerTo(AS);
2942 CGBuilderTy &Builder = CGF.Builder;
2963 Addr = AdjustVirtualBase(CGF, E, RD, Base, VirtualBaseAdjustmentOffset,
2970 Addr = Builder.CreateBitCast(Addr, CGF.Int8Ty->getPointerTo(AS));
2981 MicrosoftCXXABI::EmitMemberPointerConversion(CodeGenFunction &CGF,
3010 CGBuilderTy &Builder = CGF.Builder;
3013 llvm::Value *IsNotNull = EmitMemberPointerIsNotNull(CGF, Src, SrcTy);
3026 llvm::BasicBlock *ConvertBB = CGF.createBasicBlock("memptr.convert");
3027 llvm::BasicBlock *ContinueBB = CGF.createBasicBlock("memptr.converted");
3029 CGF.EmitBlock(ConvertBB);
3038 CGF.EmitBlock(ContinueBB);
3226 CodeGenFunction &CGF, const Expr *E, Address This,
3235 CGBuilderTy &Builder = CGF.Builder;
3258 ThisPtrForCall = AdjustVirtualBase(CGF, E, RD, This,
3266 llvm::Value *Ptr = Builder.CreateBitCast(ThisPtrForCall, CGF.Int8PtrTy);
3820 CodeGenFunction CGF(CGM);
3821 CGF.CurGD = GlobalDecl(CD, Ctor_Complete);
3827 buildThisParam(CGF, FunctionArgs);
3849 CGF.StartFunction(GlobalDecl(), FnInfo.getReturnType(), ThunkFn, FnInfo,
3851 EmitThisParam(CGF);
3852 llvm::Value *This = getThisValue(CGF);
3855 IsCopy ? CGF.Builder.CreateLoad(CGF.GetAddrOfLocalVar(&SrcParam), "src")
3875 CodeGenFunction::RunCleanupsScope Cleanups(CGF);
3878 CGF.EmitCallArgs(Args, FPT, llvm::makeArrayRef(ArgVec), CD, IsCopy ? 1 : 0);
3881 unsigned ExtraArgs = addImplicitConstructorArgs(CGF, CD, Ctor_Complete,
3889 CGF.EmitCall(CalleeInfo, CalleeFn, ReturnValueSlot(), Args, CD);
3895 CGF.FinishFunction(SourceLocation());
4172 void MicrosoftCXXABI::emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) {
4177 Address AI = CGF.CreateMemTemp(ThrowType);
4178 CGF.EmitAnyExprToMem(SubExpr, AI, ThrowType.getQualifiers(),
4187 CGF.Builder.CreateBitCast(AI.getPointer(), CGM.Int8PtrTy),
4190 CGF.EmitNoreturnRuntimeCallOrInvoke(getThrowFn(), Args);