diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h --- a/llvm/include/llvm/Analysis/LazyCallGraph.h +++ b/llvm/include/llvm/Analysis/LazyCallGraph.h @@ -463,7 +463,7 @@ /// Dump a short description of this SCC to stderr. void dump() const; -#ifndef NDEBUG +#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS) /// Verify invariants about the SCC. /// /// This will attempt to validate all of the basic invariants within an @@ -584,7 +584,7 @@ /// Dump a short description of this RefSCC to stderr. void dump() const; -#ifndef NDEBUG +#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS) /// Verify invariants about the RefSCC and all its SCCs. /// /// This will attempt to validate all of the invariants *within* the diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -241,7 +241,7 @@ } #endif -#ifndef NDEBUG +#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS) void LazyCallGraph::SCC::verify() { assert(OuterRefSCC && "Can't have a null RefSCC!"); assert(!Nodes.empty() && "Can't have an empty SCC!"); @@ -333,7 +333,7 @@ } #endif -#ifndef NDEBUG +#if !defined(NDEBUG) || defined(EXPENSIVE_CHECKS) void LazyCallGraph::RefSCC::verify() { assert(G && "Can't have a null graph!"); assert(!SCCs.empty() && "Can't have an empty SCC!");