]> granicus.if.org Git - clang/commitdiff
Rename CleanupScope -> DelayedCleanupBlock. No functionality change.
authorDouglas Gregor <dgregor@apple.com>
Tue, 24 Nov 2009 16:21:10 +0000 (16:21 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 24 Nov 2009 16:21:10 +0000 (16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89769 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h

index d47d31f20ea429ac2af06aaf3b8969ee965b2ba6..a3d38bce4a14774920cf7098438e8c18ccdef62f 100644 (file)
@@ -376,7 +376,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
 
       {
         // Push a cleanup block and restore the stack there.
-        CleanupScope scope(*this);
+        DelayedCleanupBlock scope(*this);
 
         V = Builder.CreateLoad(Stack, "tmp");
         llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stackrestore);
@@ -521,7 +521,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
         
         if (const ConstantArrayType *Array = 
               getContext().getAsConstantArrayType(Ty)) {
-          CleanupScope Scope(*this);
+          DelayedCleanupBlock Scope(*this);
           QualType BaseElementTy = getContext().getBaseElementType(Array);
           const llvm::Type *BasePtr = ConvertType(BaseElementTy);
           BasePtr = llvm::PointerType::getUnqual(BasePtr);
@@ -532,7 +532,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
           // Make sure to jump to the exit block.
           EmitBranch(Scope.getCleanupExitBlock());
         } else {
-          CleanupScope Scope(*this);
+          DelayedCleanupBlock Scope(*this);
           EmitCXXDestructorCall(D, Dtor_Complete, DeclPtr);
         }
       }
@@ -545,7 +545,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
     llvm::Constant* F = CGM.GetAddrOfFunction(FD);
     assert(F && "Could not find function!");
 
-    CleanupScope scope(*this);
+    DelayedCleanupBlock scope(*this);
 
     const CGFunctionInfo &Info = CGM.getTypes().getFunctionInfo(FD);
 
@@ -566,7 +566,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
   }
 
   if (needsDispose && CGM.getLangOptions().getGCMode() != LangOptions::GCOnly) {
-    CleanupScope scope(*this);
+    DelayedCleanupBlock scope(*this);
     llvm::Value *V = Builder.CreateStructGEP(DeclPtr, 1, "forwarding");
     V = Builder.CreateLoad(V, false);
     BuildBlockRelease(V);
index 3a93473c54283c6ea4e36cc4ef75d6ed000853b7..2c7ea9b60ea4ad7474b9b3e621f2aa704de84139 100644 (file)
@@ -137,7 +137,7 @@ RValue CodeGenFunction::EmitReferenceBindingToExpr(const Expr* E,
             const CXXDestructorDecl *Dtor =
               ClassDecl->getDestructor(getContext());
 
-            CleanupScope scope(*this);
+            DelayedCleanupBlock scope(*this);
             EmitCXXDestructorCall(Dtor, Dtor_Complete, Val.getAggregateAddr());
           }
         }
index 6d0d81ecfc96823a9e48535c7e8077a99c3843b7..dd26428f8190fdbef0f856eff0aebb4fef1ec3c4 100644 (file)
@@ -133,17 +133,17 @@ public:
   /// block.
   CleanupBlockInfo PopCleanupBlock();
 
-  /// CleanupScope - RAII object that will create a cleanup block and set the
+  /// DelayedCleanupBlock - RAII object that will create a cleanup block and set the
   /// insert point to that block. When destructed, it sets the insert point to
   /// the previous block and pushes a new cleanup entry on the stack.
-  class CleanupScope {
+  class DelayedCleanupBlock {
     CodeGenFunction& CGF;
     llvm::BasicBlock *CurBB;
     llvm::BasicBlock *CleanupEntryBB;
     llvm::BasicBlock *CleanupExitBB;
     
   public:
-    CleanupScope(CodeGenFunction &cgf)
+    DelayedCleanupBlock(CodeGenFunction &cgf)
       : CGF(cgf), CurBB(CGF.Builder.GetInsertBlock()),
       CleanupEntryBB(CGF.createBasicBlock("cleanup")), CleanupExitBB(0) {
       CGF.Builder.SetInsertPoint(CleanupEntryBB);
@@ -155,7 +155,7 @@ public:
       return CleanupExitBB;
     }
     
-    ~CleanupScope() {
+    ~DelayedCleanupBlock() {
       CGF.PushCleanupBlock(CleanupEntryBB, CleanupExitBB);
       // FIXME: This is silly, move this into the builder.
       if (CurBB)