From: Richard Smith Date: Thu, 20 Jun 2019 20:56:20 +0000 (+0000) Subject: Rename CodeGenFunction::overlapFor* to getOverlapFor*. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=662d27fff7c165ca37f37003ca22f1fef3bbd8de;p=clang Rename CodeGenFunction::overlapFor* to getOverlapFor*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363980 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp index 9e1312b786..9a9dd88810 100644 --- a/lib/CodeGen/CGClass.cpp +++ b/lib/CodeGen/CGClass.cpp @@ -556,7 +556,7 @@ static void EmitBaseInitializer(CodeGenFunction &CGF, AggValueSlot::IsDestructed, AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased, - CGF.overlapForBaseInit(ClassDecl, BaseClassDecl, isBaseVirtual)); + CGF.getOverlapForBaseInit(ClassDecl, BaseClassDecl, isBaseVirtual)); CGF.EmitAggExpr(BaseInit->getInit(), AggSlot); @@ -645,7 +645,7 @@ static void EmitMemberInitializer(CodeGenFunction &CGF, LValue Src = CGF.EmitLValueForFieldInitialization(ThisRHSLV, Field); // Copy the aggregate. - CGF.EmitAggregateCopy(LHS, Src, FieldType, CGF.overlapForFieldInit(Field), + CGF.EmitAggregateCopy(LHS, Src, FieldType, CGF.getOverlapForFieldInit(Field), LHS.isVolatileQualified()); // Ensure that we destroy the objects if an exception is thrown later in // the constructor. @@ -681,7 +681,7 @@ void CodeGenFunction::EmitInitializerForField(FieldDecl *Field, LValue LHS, AggValueSlot::IsDestructed, AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased, - overlapForFieldInit(Field), + getOverlapForFieldInit(Field), AggValueSlot::IsNotZeroed, // Checks are made by the code that calls constructor. AggValueSlot::IsSanitizerChecked); diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index c4e0d89c83..d1e250e7ec 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -1894,7 +1894,7 @@ void CodeGenFunction::EmitExprAsInit(const Expr *init, const ValueDecl *D, if (isa(D)) Overlap = AggValueSlot::DoesNotOverlap; else if (auto *FD = dyn_cast(D)) - Overlap = overlapForFieldInit(FD); + Overlap = getOverlapForFieldInit(FD); // TODO: how can we delay here if D is captured by its initializer? EmitAggExpr(init, AggValueSlot::forLValue(lvalue, AggValueSlot::IsDestructed, diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index a41b420801..fe31f83628 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -1494,7 +1494,7 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) { AggValueSlot::IsDestructed, AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased, - CGF.overlapForBaseInit(CXXRD, BaseRD, Base.isVirtual())); + CGF.getOverlapForBaseInit(CXXRD, BaseRD, Base.isVirtual())); CGF.EmitAggExpr(E->getInit(curInitIndex++), AggSlot); if (QualType::DestructionKind dtorKind = @@ -1847,7 +1847,7 @@ LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) { } AggValueSlot::Overlap_t -CodeGenFunction::overlapForFieldInit(const FieldDecl *FD) { +CodeGenFunction::getOverlapForFieldInit(const FieldDecl *FD) { if (!FD->hasAttr() || !FD->getType()->isRecordType()) return AggValueSlot::DoesNotOverlap; @@ -1865,7 +1865,7 @@ CodeGenFunction::overlapForFieldInit(const FieldDecl *FD) { return AggValueSlot::MayOverlap; } -AggValueSlot::Overlap_t CodeGenFunction::overlapForBaseInit( +AggValueSlot::Overlap_t CodeGenFunction::getOverlapForBaseInit( const CXXRecordDecl *RD, const CXXRecordDecl *BaseRD, bool IsVirtual) { // If the most-derived object is a field declared with [[no_unique_address]], // the tail padding of any virtual base could be reused for other subobjects diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 31ffab5d0b..37d8bd08db 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -1157,7 +1157,7 @@ CodeGenFunction::generateObjCGetterBody(const ObjCImplementationDecl *classImpl, // that's not necessarily the same as "on the stack", so // we still potentially need objc_memmove_collectable. EmitAggregateCopy(/* Dest= */ MakeAddrLValue(ReturnValue, ivarType), - /* Src= */ LV, ivarType, overlapForReturnValue()); + /* Src= */ LV, ivarType, getOverlapForReturnValue()); return; } case TEK_Scalar: { diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 5c24db7092..8909f8fe1e 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -1024,7 +1024,7 @@ void CodeGenFunction::EmitReturnOfRValue(RValue RV, QualType Ty) { } else if (RV.isAggregate()) { LValue Dest = MakeAddrLValue(ReturnValue, Ty); LValue Src = MakeAddrLValue(RV.getAggregateAddress(), Ty); - EmitAggregateCopy(Dest, Src, Ty, overlapForReturnValue()); + EmitAggregateCopy(Dest, Src, Ty, getOverlapForReturnValue()); } else { EmitStoreOfComplex(RV.getComplexVal(), MakeAddrLValue(ReturnValue, Ty), /*init*/ true); @@ -1106,7 +1106,7 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { AggValueSlot::IsDestructed, AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased, - overlapForReturnValue())); + getOverlapForReturnValue())); break; } } diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index efb68c5604..3516e842dd 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2314,7 +2314,7 @@ public: } /// Determine whether a return value slot may overlap some other object. - AggValueSlot::Overlap_t overlapForReturnValue() { + AggValueSlot::Overlap_t getOverlapForReturnValue() { // FIXME: Assuming no overlap here breaks guaranteed copy elision for base // class subobjects. These cases may need to be revisited depending on the // resolution of the relevant core issue. @@ -2322,13 +2322,13 @@ public: } /// Determine whether a field initialization may overlap some other object. - AggValueSlot::Overlap_t overlapForFieldInit(const FieldDecl *FD); + AggValueSlot::Overlap_t getOverlapForFieldInit(const FieldDecl *FD); /// Determine whether a base class initialization may overlap some other /// object. - AggValueSlot::Overlap_t overlapForBaseInit(const CXXRecordDecl *RD, - const CXXRecordDecl *BaseRD, - bool IsVirtual); + AggValueSlot::Overlap_t getOverlapForBaseInit(const CXXRecordDecl *RD, + const CXXRecordDecl *BaseRD, + bool IsVirtual); /// Emit an aggregate assignment. void EmitAggregateAssign(LValue Dest, LValue Src, QualType EltTy) {