forked from OSchip/llvm-project
Sema: Don't emit a gajillion calls to sanity() -- an empty function -- in NDEBUG
builds. Sheesh. llvm-svn: 152279
This commit is contained in:
parent
02a80da331
commit
9e19f13416
|
@ -600,7 +600,13 @@ private:
|
|||
void configure();
|
||||
|
||||
// Sanity checks.
|
||||
void sanity() const;
|
||||
void sanityImpl() const;
|
||||
|
||||
void sanity() const {
|
||||
#ifndef NDEBUG
|
||||
sanityImpl();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool sanityCheckUnresolved() const {
|
||||
for (iterator I = begin(), E = end(); I != E; ++I)
|
||||
|
|
|
@ -302,7 +302,9 @@ void LookupResult::configure() {
|
|||
}
|
||||
}
|
||||
|
||||
void LookupResult::sanity() const {
|
||||
void LookupResult::sanityImpl() const {
|
||||
// Note that this function is never called by NDEBUG builds. See
|
||||
// LookupResult::sanity().
|
||||
assert(ResultKind != NotFound || Decls.size() == 0);
|
||||
assert(ResultKind != Found || Decls.size() == 1);
|
||||
assert(ResultKind != FoundOverloaded || Decls.size() > 1 ||
|
||||
|
|
Loading…
Reference in New Issue