Lines Matching full:cgf
26 static void EmitDeclInit(CodeGenFunction &CGF, const VarDecl &D,
33 LValue lv = CGF.MakeAddrLValue(DeclPtr, type);
36 switch (CGF.getEvaluationKind(type)) {
38 CodeGenModule &CGM = CGF.CGM;
40 CGM.getObjCRuntime().EmitObjCGlobalAssign(CGF, CGF.EmitScalarExpr(Init),
43 CGM.getObjCRuntime().EmitObjCWeakAssign(CGF, CGF.EmitScalarExpr(Init),
46 CGF.EmitScalarInit(Init, &D, lv, false);
50 CGF.EmitComplexExprIntoLValue(Init, lv, /*isInit*/ true);
53 CGF.EmitAggExpr(Init, AggValueSlot::forLValue(lv,AggValueSlot::IsDestructed,
63 static void EmitDeclDestroy(CodeGenFunction &CGF, const VarDecl &D,
65 CodeGenModule &CGM = CGF.CGM;
107 addr.getPointer(), CGF.getTypes().ConvertType(type)->getPointerTo());
112 .generateDestroyHelper(addr, type, CGF.getDestroyer(dtorKind),
113 CGF.needsEHCleanup(dtorKind), &D);
114 argument = llvm::Constant::getNullValue(CGF.Int8PtrTy);
117 CGM.getCXXABI().registerGlobalDtor(CGF, D, function, argument);
122 static void EmitDeclInvariant(CodeGenFunction &CGF, const VarDecl &D,
125 if (!CGF.CGM.getCodeGenOpts().OptimizationLevel)
130 llvm::Constant *InvariantStart = CGF.CGM.getIntrinsic(InvStartID);
133 CharUnits WidthChars = CGF.getContext().getTypeSizeInChars(D.getType());
135 llvm::Value *Args[2] = { llvm::ConstantInt::getSigned(CGF.Int64Ty, Width),
136 llvm::ConstantExpr::getBitCast(Addr, CGF.Int8PtrTy)};
137 CGF.Builder.CreateCall(InvariantStart, Args);
210 CodeGenFunction CGF(CGM);
212 CGF.StartFunction(&VD, CGM.getContext().VoidTy, fn, FI, FunctionArgList());
214 llvm::CallInst *call = CGF.Builder.CreateCall(dtor, addr);
221 CGF.FinishFunction();