Lines Matching refs:GD

42 llvm::Constant *CodeGenModule::GetAddrOfThunk(GlobalDecl GD, 
44 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
50 getCXXABI().getMangleContext().mangleCXXDtorThunk(DD, GD.getDtorType(),
56 llvm::Type *Ty = getTypes().GetFunctionTypeForVTable(GD);
57 return GetOrCreateLLVMFunction(Name, Ty, GD, /*ForVTable=*/true);
177 GlobalDecl GD, const ThunkInfo &Thunk) {
178 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
185 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
241 void CodeGenFunction::StartThunk(llvm::Function *Fn, GlobalDecl GD,
244 CurGD = GD;
247 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
251 CGM.getCXXABI().HasThisReturn(GD) ? ThisType : FPT->getResultType();
272 void CodeGenFunction::EmitCallAndReturnForThunk(GlobalDecl GD,
277 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
290 CGM.getCXXABI().adjustCallArgsForDestructorThunk(*this, GD, CallArgs);
319 CGM.getCXXABI().HasThisReturn(GD) ? ThisType : FPT->getResultType();
345 GlobalDecl GD, const ThunkInfo &Thunk) {
346 StartThunk(Fn, GD, FnInfo);
350 CGM.getTypes().GetFunctionType(CGM.getTypes().arrangeGlobalDeclaration(GD));
351 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
354 EmitCallAndReturnForThunk(GD, Callee, &Thunk);
357 CGM.setFunctionLinkage(GD, Fn);
360 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
364 void CodeGenVTables::emitThunk(GlobalDecl GD, const ThunkInfo &Thunk,
366 const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeGlobalDeclaration(GD);
369 llvm::Constant *Entry = CGM.GetAddrOfThunk(GD, Thunk);
380 CGM.getTypes().GetFunctionTypeForVTable(GD)) {
389 Entry = CGM.GetAddrOfThunk(GD, Thunk);
413 CGM.setFunctionLinkage(GD, ThunkFn);
417 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn);
426 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, Thunk);
431 CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk);
436 void CodeGenVTables::maybeEmitThunkForVTable(GlobalDecl GD,
447 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
452 emitThunk(GD, Thunk, /*ForVTable=*/true);
455 void CodeGenVTables::EmitThunks(GlobalDecl GD)
458 cast<CXXMethodDecl>(GD.getDecl())->getCanonicalDecl();
461 if (isa<CXXDestructorDecl>(MD) && GD.getDtorType() == Dtor_Base)
466 ThunkInfoVector = MicrosoftVTContext->getThunkInfo(GD);
468 ThunkInfoVector = ItaniumVTContext.getThunkInfo(GD);
475 emitThunk(GD, (*ThunkInfoVector)[I], /*ForVTable=*/false);
525 GlobalDecl GD;
532 GD = Component.getFunctionDecl();
535 GD = GlobalDecl(Component.getDestructorDecl(), Dtor_Complete);
538 GD = GlobalDecl(Component.getDestructorDecl(), Dtor_Deleting);
542 if (cast<CXXMethodDecl>(GD.getDecl())->isPure()) {
553 } else if (cast<CXXMethodDecl>(GD.getDecl())->isDeleted()) {
570 maybeEmitThunkForVTable(GD, Thunk);
571 Init = CGM.GetAddrOfThunk(GD, Thunk);
575 llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVTable(GD);
577 Init = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);