]> granicus.if.org Git - clang/commitdiff
Rename CodeGenFunction::overlapFor* to getOverlapFor*.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 20 Jun 2019 20:56:20 +0000 (20:56 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 20 Jun 2019 20:56:20 +0000 (20:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363980 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.h

index 9e1312b786d620218ad6304d9f0a233d00a2cb47..9a9dd88810ed31780bb8071d129dca6a4cb50112 100644 (file)
@@ -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);
index c4e0d89c83c05366a083f6a3b248026c926bc902..d1e250e7ec5d79c7fa8f668a3a7e79b6500834cc 100644 (file)
@@ -1894,7 +1894,7 @@ void CodeGenFunction::EmitExprAsInit(const Expr *init, const ValueDecl *D,
       if (isa<VarDecl>(D))
         Overlap = AggValueSlot::DoesNotOverlap;
       else if (auto *FD = dyn_cast<FieldDecl>(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,
index a41b420801f22d67ae42f8c6b35e8a0302e9a3c3..fe31f83628613f865cc52f6d2e5643b0a22fc637 100644 (file)
@@ -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<NoUniqueAddressAttr>() || !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
index 31ffab5d0bcde1c9ed88401db947efe5c8ce877b..37d8bd08db991fed5274c1934a77512ca1a245b4 100644 (file)
@@ -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: {
index 5c24db709250e1736787b412abf7fa7a9332d906..8909f8fe1eefddcc96204b337476612e8eda24ad 100644 (file)
@@ -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;
     }
   }
index efb68c560412c09f69a3f278840bc3401b856c21..3516e842ddc9c98fbcf65cdba423b179c889835b 100644 (file)
@@ -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) {