StmtIterator.cpp (198092) | StmtIterator.cpp (201361) |
---|---|
1//===--- StmtIterator.cpp - Iterators for Statements ------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 51 unchanged lines hidden (view full) --- 60 RawVAPtr = 0; 61 } 62} 63 64void StmtIteratorBase::NextDecl(bool ImmediateAdvance) { 65 assert (getVAPtr() == NULL); 66 67 if (inDecl()) { | 1//===--- StmtIterator.cpp - Iterators for Statements ------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 51 unchanged lines hidden (view full) --- 60 RawVAPtr = 0; 61 } 62} 63 64void StmtIteratorBase::NextDecl(bool ImmediateAdvance) { 65 assert (getVAPtr() == NULL); 66 67 if (inDecl()) { |
68 assert (decl); | 68 assert(decl); |
69 70 // FIXME: SIMPLIFY AWAY. 71 if (ImmediateAdvance) 72 decl = 0; 73 else if (HandleDecl(decl)) 74 return; 75 } 76 else { | 69 70 // FIXME: SIMPLIFY AWAY. 71 if (ImmediateAdvance) 72 decl = 0; 73 else if (HandleDecl(decl)) 74 return; 75 } 76 else { |
77 assert (inDeclGroup()); | 77 assert(inDeclGroup()); |
78 79 if (ImmediateAdvance) 80 ++DGI; 81 82 for ( ; DGI != DGE; ++DGI) 83 if (HandleDecl(*DGI)) 84 return; 85 } --- 22 unchanged lines hidden (view full) --- 108 else if (EnumConstantDecl* ECD = dyn_cast<EnumConstantDecl>(D)) { 109 if (ECD->getInitExpr()) 110 return true; 111 } 112 113 return false; 114} 115 | 78 79 if (ImmediateAdvance) 80 ++DGI; 81 82 for ( ; DGI != DGE; ++DGI) 83 if (HandleDecl(*DGI)) 84 return; 85 } --- 22 unchanged lines hidden (view full) --- 108 else if (EnumConstantDecl* ECD = dyn_cast<EnumConstantDecl>(D)) { 109 if (ECD->getInitExpr()) 110 return true; 111 } 112 113 return false; 114} 115 |
116StmtIteratorBase::StmtIteratorBase(Decl* d) 117 : decl(d), RawVAPtr(DeclMode) { 118 assert (decl); 119 NextDecl(false); | 116StmtIteratorBase::StmtIteratorBase(Decl *d, Stmt **s) 117 : stmt(s), decl(d), RawVAPtr(d ? DeclMode : 0) { 118 if (decl) 119 NextDecl(false); |
120} 121 122StmtIteratorBase::StmtIteratorBase(Decl** dgi, Decl** dge) | 120} 121 122StmtIteratorBase::StmtIteratorBase(Decl** dgi, Decl** dge) |
123 : DGI(dgi), RawVAPtr(DeclGroupMode), DGE(dge) { | 123 : stmt(0), DGI(dgi), RawVAPtr(DeclGroupMode), DGE(dge) { |
124 NextDecl(false); 125} 126 127StmtIteratorBase::StmtIteratorBase(VariableArrayType* t) | 124 NextDecl(false); 125} 126 127StmtIteratorBase::StmtIteratorBase(VariableArrayType* t) |
128: decl(0), RawVAPtr(SizeOfTypeVAMode) { | 128 : stmt(0), decl(0), RawVAPtr(SizeOfTypeVAMode) { |
129 RawVAPtr |= reinterpret_cast<uintptr_t>(t); 130} 131 132Stmt*& StmtIteratorBase::GetDeclExpr() const { 133 134 if (VariableArrayType* VAPtr = getVAPtr()) { 135 assert (VAPtr->SizeExpr); 136 return VAPtr->SizeExpr; --- 19 unchanged lines hidden --- | 129 RawVAPtr |= reinterpret_cast<uintptr_t>(t); 130} 131 132Stmt*& StmtIteratorBase::GetDeclExpr() const { 133 134 if (VariableArrayType* VAPtr = getVAPtr()) { 135 assert (VAPtr->SizeExpr); 136 return VAPtr->SizeExpr; --- 19 unchanged lines hidden --- |