diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-02-28 21:01:15 +0000 | 
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-02-28 21:01:15 +0000 | 
| commit | 4f967391222618911f74bba9fb04dc57a5d7fc05 (patch) | |
| tree | 100ba3c61f838ea0eae05c59c9eeecaefd39a584 | |
| parent | 111a6bdbd323c5103f3aa2fffafe9cf37a7cf451 (diff) | |
| download | bcm5719-llvm-4f967391222618911f74bba9fb04dc57a5d7fc05.tar.gz bcm5719-llvm-4f967391222618911f74bba9fb04dc57a5d7fc05.zip | |
Remove PrevFunctionScope slot (it isn't needed)...use getParent() instead.
llvm-svn: 65718
| -rw-r--r-- | clang/lib/Sema/Sema.h | 4 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 | 
2 files changed, 3 insertions, 7 deletions
| diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index ead93cb7494..3e9d07aefb6 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -2069,10 +2069,6 @@ struct BlockSemaInfo {    /// 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; diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index e34a22e039b..1a93039b032 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -4404,7 +4404,6 @@ void Sema::ActOnBlockStart(SourceLocation CaretLoc, Scope *BlockScope) {    // Add BSI to CurBlock.    BSI->PrevBlockInfo = CurBlock; -  BSI->PrevFunctionScope = ActiveScope;    CurBlock = BSI;    ActiveScope = BlockScope; @@ -4501,8 +4500,9 @@ Sema::ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, StmtTy *body,    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; | 

