Lines Matching refs:GD
35 llvm::Constant *CodeGenModule::GetAddrOfThunk(GlobalDecl GD, in GetAddrOfThunk() argument
37 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); in GetAddrOfThunk()
43 getCXXABI().getMangleContext().mangleCXXDtorThunk(DD, GD.getDtorType(), in GetAddrOfThunk()
48 llvm::Type *Ty = getTypes().GetFunctionTypeForVTable(GD); in GetAddrOfThunk()
49 return GetOrCreateLLVMFunction(Name, Ty, GD, /*ForVTable=*/true, in GetAddrOfThunk()
60 GlobalDecl GD) { in setThunkProperties() argument
61 CGM.setFunctionLinkage(GD, ThunkFn); in setThunkProperties()
62 CGM.getCXXABI().setThunkLinkage(ThunkFn, ForVTable, GD, in setThunkProperties()
66 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); in setThunkProperties()
146 GlobalDecl GD, const ThunkInfo &Thunk) { in GenerateVarArgsThunk() argument
147 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); in GenerateVarArgsThunk()
154 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true); in GenerateVarArgsThunk()
208 void CodeGenFunction::StartThunk(llvm::Function *Fn, GlobalDecl GD, in StartThunk() argument
211 CurGD = GD; in StartThunk()
215 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); in StartThunk()
218 QualType ResultType = CGM.getCXXABI().HasThisReturn(GD) in StartThunk()
220 : CGM.getCXXABI().hasMostDerivedReturn(GD) in StartThunk()
398 GlobalDecl GD, const ThunkInfo &Thunk) { in generateThunk() argument
399 StartThunk(Fn, GD, FnInfo); in generateThunk()
403 CGM.getTypes().GetFunctionType(CGM.getTypes().arrangeGlobalDeclaration(GD)); in generateThunk()
404 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true); in generateThunk()
410 void CodeGenVTables::emitThunk(GlobalDecl GD, const ThunkInfo &Thunk, in emitThunk() argument
412 const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeGlobalDeclaration(GD); in emitThunk()
415 llvm::Constant *C = CGM.GetAddrOfThunk(GD, Thunk); in emitThunk()
429 CGM.getTypes().GetFunctionTypeForVTable(GD)) { in emitThunk()
438 Entry = cast<llvm::GlobalValue>(CGM.GetAddrOfThunk(GD, Thunk)); in emitThunk()
461 setThunkProperties(CGM, Thunk, ThunkFn, ForVTable, GD); in emitThunk()
465 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn); in emitThunk()
476 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, Thunk); in emitThunk()
479 CodeGenFunction(CGM).generateThunk(ThunkFn, FnInfo, GD, Thunk); in emitThunk()
482 setThunkProperties(CGM, Thunk, ThunkFn, ForVTable, GD); in emitThunk()
485 void CodeGenVTables::maybeEmitThunkForVTable(GlobalDecl GD, in maybeEmitThunkForVTable() argument
496 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); in maybeEmitThunkForVTable()
501 emitThunk(GD, Thunk, /*ForVTable=*/true); in maybeEmitThunkForVTable()
504 void CodeGenVTables::EmitThunks(GlobalDecl GD) in EmitThunks() argument
507 cast<CXXMethodDecl>(GD.getDecl())->getCanonicalDecl(); in EmitThunks()
510 if (isa<CXXDestructorDecl>(MD) && GD.getDtorType() == Dtor_Base) in EmitThunks()
514 VTContext->getThunkInfo(GD); in EmitThunks()
520 emitThunk(GD, Thunk, /*ForVTable=*/false); in EmitThunks()
565 GlobalDecl GD; in CreateVTableInitializer() local
572 GD = Component.getFunctionDecl(); in CreateVTableInitializer()
575 GD = GlobalDecl(Component.getDestructorDecl(), Dtor_Complete); in CreateVTableInitializer()
578 GD = GlobalDecl(Component.getDestructorDecl(), Dtor_Deleting); in CreateVTableInitializer()
586 const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl()); in CreateVTableInitializer()
600 if (cast<CXXMethodDecl>(GD.getDecl())->isPure()) { in CreateVTableInitializer()
613 } else if (cast<CXXMethodDecl>(GD.getDecl())->isDeleted()) { in CreateVTableInitializer()
632 maybeEmitThunkForVTable(GD, Thunk); in CreateVTableInitializer()
633 Init = CGM.GetAddrOfThunk(GD, Thunk); in CreateVTableInitializer()
637 llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVTable(GD); in CreateVTableInitializer()
639 Init = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true); in CreateVTableInitializer()