Do not change the size of LookupResult::Filter based on the NDEBUG

macri; the extra bool fits into padding anyway.

llvm-svn: 120708
This commit is contained in:
Douglas Gregor 2010-12-02 16:19:31 +00:00
parent 11ab8ddf10
commit 2da6670ef0
2 changed files with 1 additions and 16 deletions

View File

@ -497,25 +497,18 @@ public:
LookupResult &Results;
LookupResult::iterator I;
bool Changed;
#ifndef NDEBUG
bool CalledDone;
#endif
friend class LookupResult;
Filter(LookupResult &Results)
: Results(Results), I(Results.begin()), Changed(false)
#ifndef NDEBUG
, CalledDone(false)
#endif
: Results(Results), I(Results.begin()), Changed(false), CalledDone(false)
{}
public:
#ifndef NDEBUG
~Filter() {
assert(CalledDone &&
"LookupResult::Filter destroyed without done() call");
}
#endif
bool hasNext() const {
return I != Results.end();
@ -546,10 +539,8 @@ public:
}
void done() {
#ifndef NDEBUG
assert(!CalledDone && "done() called twice");
CalledDone = true;
#endif
if (Changed)
Results.resolveKindAfterFilter();
@ -578,11 +569,7 @@ private:
void configure();
// Sanity checks.
#ifndef NDEBUG
void sanity() const;
#else
void sanity() const {}
#endif
bool sanityCheckUnresolved() const {
for (iterator I = begin(), E = end(); I != E; ++I)

View File

@ -292,7 +292,6 @@ void LookupResult::configure() {
}
}
#ifndef NDEBUG
void LookupResult::sanity() const {
assert(ResultKind != NotFound || Decls.size() == 0);
assert(ResultKind != Found || Decls.size() == 1);
@ -307,7 +306,6 @@ void LookupResult::sanity() const {
(Ambiguity == AmbiguousBaseSubobjectTypes ||
Ambiguity == AmbiguousBaseSubobjects)));
}
#endif
// Necessary because CXXBasePaths is not complete in Sema.h
void LookupResult::deletePaths(CXXBasePaths *Paths) {