[cfe-commits] r65718 - in /cfe/trunk/lib/Sema: Sema.h SemaExpr.cpp

Steve Naroff snaroff at apple.com
Sat Feb 28 13:01:15 PST 2009


Author: snaroff
Date: Sat Feb 28 15:01:15 2009
New Revision: 65718

URL: http://llvm.org/viewvc/llvm-project?rev=65718&view=rev
Log:
Remove PrevFunctionScope slot (it isn't needed)...use getParent() instead.


Modified:
    cfe/trunk/lib/Sema/Sema.h
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=65718&r1=65717&r2=65718&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Sat Feb 28 15:01:15 2009
@@ -2069,10 +2069,6 @@
   /// arguments etc.
   Scope *TheScope;
   
-  /// PrevFunctionScope - This is the scope for the enclosing function.
-  /// For global blocks, this will be null.
-  Scope *PrevFunctionScope;
-  
   /// ReturnType - This will get set to block result type, by looking at
   /// return types, if any, in the block body.
   Type *ReturnType;

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=65718&r1=65717&r2=65718&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Feb 28 15:01:15 2009
@@ -4404,7 +4404,6 @@
 
   // Add BSI to CurBlock.
   BSI->PrevBlockInfo = CurBlock;
-  BSI->PrevFunctionScope = ActiveScope;
   CurBlock = BSI;
   ActiveScope = BlockScope;
 
@@ -4501,8 +4500,9 @@
 
   PopDeclContext();
 
-  ActiveScope = CurBlock->PrevFunctionScope;
-    
+  // Before poping CurBlock, set ActiveScope to this scopes parent.
+  ActiveScope = CurBlock->TheScope->getParent();
+  
   // Pop off CurBlock, handle nested blocks.
   CurBlock = CurBlock->PrevBlockInfo;
 





More information about the cfe-commits mailing list