Lines Matching defs:CGM

32 CodeGenVTables::CodeGenVTables(CodeGenModule &CGM)
33 : CGM(CGM), VTContext(CGM.getContext().getVTableContext()) {}
54 static void setThunkVisibility(CodeGenModule &CGM, const CXXMethodDecl *MD,
56 CGM.setGlobalVisibility(Fn, MD);
91 ReturnValue = CGF.CGM.getCXXABI().performReturnAdjustment(CGF, ReturnValue,
136 llvm::Type *Ty = CGM.getTypes().GetFunctionType(FnInfo);
137 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
144 CGM.getModule().getFunctionList().push_back(NewFn);
155 if (CGM.ReturnTypeUsesSRet(FnInfo))
174 CGM.getCXXABI().performThisAdjustment(*this, ThisPtr, Thunk.This);
203 CGM.getCXXABI().HasThisReturn(GD) ? ThisType : FPT->getReturnType();
207 CGM.getCXXABI().buildThisParam(*this, FunctionArgs);
216 CGM.getCXXABI().addImplicitStructorParams(*this, ResultType, FunctionArgs);
223 CGM.getCXXABI().EmitInstanceFunctionProlog(*this);
235 llvm::Value *AdjustedThisPtr = Thunk ? CGM.getCXXABI().performThisAdjustment(
245 CGM.getCXXABI().adjustCallArgsForDestructorThunk(*this, GD, CallArgs);
256 CGM.getTypes().arrangeCXXMethodCall(CallArgs, FPT,
274 CGM.getCXXABI().HasThisReturn(GD) ? ThisType : FPT->getReturnType();
290 CGM.getCXXABI().EmitReturnFromThunk(*this, RV, ResultType);
305 CGM.getTypes().GetFunctionType(CGM.getTypes().arrangeGlobalDeclaration(GD));
306 llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
312 CGM.setFunctionLinkage(GD, Fn);
316 setThunkVisibility(CGM, MD, Thunk, Fn);
321 const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeGlobalDeclaration(GD);
324 llvm::Constant *C = CGM.GetAddrOfThunk(GD, Thunk);
338 CGM.getTypes().GetFunctionTypeForVTable(GD)) {
347 Entry = cast<llvm::GlobalValue>(CGM.GetAddrOfThunk(GD, Thunk));
361 bool ABIHasKeyFunctions = CGM.getTarget().getCXXABI().hasKeyFunctions();
371 CGM.setFunctionLinkage(GD, ThunkFn);
375 CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn);
384 CodeGenFunction(CGM).GenerateVarArgsThunk(ThunkFn, FnInfo, GD, Thunk);
385 CGM.getCXXABI().setThunkLinkage(ThunkFn, ForVTable, GD,
390 CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk);
391 CGM.getCXXABI().setThunkLinkage(ThunkFn, ForVTable, GD,
402 if (CGM.getTarget().getCXXABI().hasKeyFunctions() &&
403 !CGM.getCodeGenOpts().OptimizationLevel)
408 if (!CGM.getTypes().isFuncTypeConvertible(
440 llvm::Type *Int8PtrTy = CGM.Int8PtrTy;
443 CGM.getTypes().ConvertType(CGM.getContext().getPointerDiffType());
497 llvm::FunctionType::get(CGM.VoidTy, /*isVarArg=*/false);
498 StringRef PureCallName = CGM.getCXXABI().GetPureVirtualCallName();
499 PureVirtualFn = CGM.CreateRuntimeFunction(Ty, PureCallName);
501 CGM.Int8PtrTy);
507 llvm::FunctionType::get(CGM.VoidTy, /*isVarArg=*/false);
509 CGM.getCXXABI().GetDeletedVirtualCallName();
510 DeletedVirtualFn = CGM.CreateRuntimeFunction(Ty, DeletedCallName);
512 CGM.Int8PtrTy);
522 Init = CGM.GetAddrOfThunk(GD, Thunk);
526 llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVTable(GD);
528 Init = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
554 if (CGDebugInfo *DI = CGM.getModuleDebugInfo())
567 cast<ItaniumMangleContext>(CGM.getCXXABI().getMangleContext())
574 llvm::ArrayType::get(CGM.Int8PtrTy, VTLayout->getNumVTableComponents());
586 CGM.CreateOrReplaceCXXRuntimeVariable(Name, ArrayType, Linkage);
587 CGM.setGlobalVisibility(VTable, RD);
592 llvm::Constant *RTTI = CGM.GetAddrOfRTTIDescriptor(
593 CGM.getContext().getTagDeclType(Base.getBase()));
700 if (CGDebugInfo *DI = CGM.getModuleDebugInfo())
704 CGM.getCXXABI().emitVirtualInheritanceTables(RD);
706 CGM.getCXXABI().emitVTableDefinitions(*this, RD);
736 const CXXMethodDecl *keyFunction = CGM.getContext().getCurrentKeyFunction(RD);
748 static bool shouldEmitVTableAtEndOfTranslationUnit(CodeGenModule &CGM,
750 return !CGM.getVTables().isVTableExternal(RD);