зеркало из https://github.com/microsoft/clang-1.git
Sema: Don't emit a gajillion calls to sanity() -- an empty function -- in NDEBUG
builds. Sheesh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
dd66be718f
Коммит
c2bd73bba5
|
@ -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 ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче