Index: include/llvm/Support/DebugCounter.h =================================================================== --- include/llvm/Support/DebugCounter.h +++ include/llvm/Support/DebugCounter.h @@ -121,8 +121,12 @@ Us.Counters[ID] = Val; } +#ifndef NDEBUG // Dump or print the current counter set. - LLVM_DUMP_METHOD void dump() { print(dbgs()); } + LLVM_DUMP_METHOD void dump() { + print(dbgs()); + } +#endif void print(raw_ostream &OS); Index: include/llvm/Transforms/Scalar/GVNExpression.h =================================================================== --- include/llvm/Transforms/Scalar/GVNExpression.h +++ include/llvm/Transforms/Scalar/GVNExpression.h @@ -121,10 +121,12 @@ OS << "}"; } +#ifndef NDEBUG LLVM_DUMP_METHOD void dump() const { print(dbgs()); dbgs() << "\n"; } +#endif }; inline raw_ostream &operator<<(raw_ostream &OS, const Expression &E) {