Lines Matching defs:CGF
23 Address CGCXXABI::getThisAddress(CodeGenFunction &CGF) {
24 return CGF.makeNaturalAddressForPointer(
25 CGF.CXXABIThisValue, CGF.CXXABIThisDecl->getType()->getPointeeType(),
26 CGF.CXXABIThisAlignment);
29 void CGCXXABI::ErrorUnsupportedABI(CodeGenFunction &CGF, StringRef S) {
30 DiagnosticsEngine &Diags = CGF.CGM.getDiags();
33 Diags.Report(CGF.getContext().getFullLoc(CGF.CurCodeDecl->getLocation()),
48 CodeGenFunction &CGF, const Expr *E, Address This,
51 ErrorUnsupportedABI(CGF, "calls through member pointers");
56 CGF.getAsNaturalPointerTo(This, CGF.getContext().getRecordType(RD));
65 CGCXXABI::EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E,
68 ErrorUnsupportedABI(CGF, "loads of member pointers");
70 llvm::PointerType::get(CGF.getLLVMContext(), Base.getAddressSpace());
74 llvm::Value *CGCXXABI::EmitMemberPointerConversion(CodeGenFunction &CGF,
77 ErrorUnsupportedABI(CGF, "member function pointer conversions");
87 CGCXXABI::EmitMemberPointerComparison(CodeGenFunction &CGF,
92 ErrorUnsupportedABI(CGF, "member function pointer comparison");
93 return CGF.Builder.getFalse();
97 CGCXXABI::EmitMemberPointerIsNotNull(CodeGenFunction &CGF,
100 ErrorUnsupportedABI(CGF, "member function pointer null testing");
101 return CGF.Builder.getFalse();
128 void CGCXXABI::buildThisParam(CodeGenFunction &CGF, FunctionArgList ¶ms) {
129 const CXXMethodDecl *MD = cast<CXXMethodDecl>(CGF.CurGD.getDecl());
138 CGF.CXXABIThisDecl = ThisDecl;
142 auto &Layout = CGF.getContext().getASTRecordLayout(MD->getParent());
145 isThisCompleteObject(CGF.CurGD)) {
146 CGF.CXXABIThisAlignment = Layout.getAlignment();
148 CGF.CXXABIThisAlignment = Layout.getNonVirtualAlignment();
152 llvm::Value *CGCXXABI::loadIncomingCXXThis(CodeGenFunction &CGF) {
153 return CGF.Builder.CreateLoad(CGF.GetAddrOfLocalVar(getThisDecl(CGF)),
157 void CGCXXABI::setCXXABIThisValue(CodeGenFunction &CGF, llvm::Value *ThisPtr) {
159 assert(getThisDecl(CGF) && "no 'this' variable for function");
160 CGF.CXXABIThisValue = ThisPtr;
208 void CGCXXABI::EmitReturnFromThunk(CodeGenFunction &CGF,
210 assert(!CGF.hasAggregateEvaluationKind(ResultType) &&
212 CGF.EmitReturnOfRValue(RV, ResultType);
226 Address CGCXXABI::InitializeArrayCookie(CodeGenFunction &CGF,
232 ErrorUnsupportedABI(CGF, "array cookie initialization");
255 void CGCXXABI::ReadArrayCookie(CodeGenFunction &CGF, Address ptr,
260 ptr = ptr.withElementType(CGF.Int8Ty);
264 allocPtr = ptr.emitRawPointer(CGF);
271 Address allocAddr = CGF.Builder.CreateConstInBoundsByteGEP(ptr, -cookieSize);
272 allocPtr = allocAddr.emitRawPointer(CGF);
273 numElements = readArrayCookieImpl(CGF, allocAddr, cookieSize);
276 llvm::Value *CGCXXABI::readArrayCookieImpl(CodeGenFunction &CGF,
279 ErrorUnsupportedABI(CGF, "reading a new[] cookie");
280 return llvm::ConstantInt::get(CGF.SizeTy, 0);
305 CGCXXABI::EmitCtorCompleteObjectHandler(CodeGenFunction &CGF,
310 ErrorUnsupportedABI(CGF, "complete object detection in ctor");
332 CGCXXABI::emitTerminateForUnexpectedException(CodeGenFunction &CGF,
335 return CGF.EmitNounwindRuntimeCall(CGF.CGM.getTerminateFn());
347 CodeGenFunction &CGF, const CXXConstructorDecl *D, CXXCtorType Type,
350 getImplicitConstructorArgs(CGF, D, Type, ForVirtualBase, Delegating);