Lines Matching defs:GD
35 GlobalDecl GD) {
36 return GetOrCreateLLVMFunction(Name, FnTy, GD, /*ForVTable=*/true,
42 GlobalDecl GD) {
43 CGM.setFunctionLinkage(GD, ThunkFn);
44 CGM.getCXXABI().setThunkLinkage(ThunkFn, ForVTable, GD,
48 CGM.setGVProperties(ThunkFn, GD);
167 GlobalDecl GD, const ThunkInfo &Thunk) {
168 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
175 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
247 void CodeGenFunction::StartThunk(llvm::Function *Fn, GlobalDecl GD,
251 CurGD = GD;
255 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
260 else if (CGM.getCXXABI().HasThisReturn(GD))
262 else if (CGM.getCXXABI().hasMostDerivedReturn(GD))
408 void CodeGenFunction::EmitMustTailThunk(GlobalDecl GD,
443 CGM.ConstructAttributeList(Callee.getCallee()->getName(), *CurFnInfo, GD,
462 const CGFunctionInfo &FnInfo, GlobalDecl GD,
465 StartThunk(Fn, GD, FnInfo, IsUnprototyped);
477 llvm::Constant *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
502 llvm::Constant *CodeGenVTables::maybeEmitThunk(GlobalDecl GD,
505 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
515 MCtx.mangleCXXDtorThunk(DD, GD.getDtorType(), TI,
520 if (CGM.getContext().useAbbreviatedThunkName(GD, Name.str())) {
523 MCtx.mangleCXXDtorThunk(DD, GD.getDtorType(), TI,
529 llvm::Type *ThunkVTableTy = CGM.getTypes().GetFunctionTypeForVTable(GD);
530 llvm::Constant *Thunk = CGM.GetAddrOfThunk(Name, ThunkVTableTy, GD);
542 : CGM.getTypes().arrangeGlobalDeclaration(GD);
576 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD);
587 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn);
614 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, TI);
617 CodeGenFunction(CGM).generateThunk(ThunkFn, FnInfo, GD, TI, IsUnprototyped);
620 setThunkProperties(CGM, TI, ThunkFn, ForVTable, GD);
624 void CodeGenVTables::EmitThunks(GlobalDecl GD) {
626 cast<CXXMethodDecl>(GD.getDecl())->getCanonicalDecl();
629 if (isa<CXXDestructorDecl>(MD) && GD.getDtorType() == Dtor_Base)
633 VTContext->getThunkInfo(GD);
639 maybeEmitThunk(GD, Thunk, /*ForVTable=*/false);
772 GlobalDecl GD = component.getGlobalDecl();
778 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
819 if (cast<CXXMethodDecl>(GD.getDecl())->isPureVirtual()) {
826 } else if (cast<CXXMethodDecl>(GD.getDecl())->isDeleted()) {
839 fnPtr = maybeEmitThunk(GD, thunkInfo, /*ForVTable=*/true);
842 GD = GD.getWithDecl(thunkInfo.Method);
847 llvm::Type *fnTy = CGM.getTypes().GetFunctionTypeForVTable(GD);
848 fnPtr = CGM.GetAddrOfFunction(GD, fnTy, /*ForVTable=*/true);
850 GD = getItaniumVTableContext().findOriginalMethod(GD);
870 return builder.addSignedPointer(fnPtr, Schema, GD, QualType());