From 94c5c1d0964046e7459c9fc864d45dd693c53bc5 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sun, 25 Oct 2015 19:55:24 +0000 Subject: [PATCH] [ScalarEvolution] Get rid of NDEBUG in header (correctly this time). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251255 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/ScalarEvolution.h | 4 ++++ lib/Analysis/ScalarEvolution.cpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index f85d328e1c8..3c28093d705 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -127,6 +127,10 @@ namespace llvm { /// Print out the internal representation of this scalar to the specified /// stream. This should really only be used for debugging purposes. void print(raw_ostream &OS) const; + + /// This method is used for debugging. + /// + void dump() const; }; // Specialize FoldingSetTrait for SCEV to avoid needing to compute diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 38f57fc1a0d..a4a551c1b3e 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -123,6 +123,12 @@ VerifySCEV("verify-scev", // Implementation of the SCEV class. // +LLVM_DUMP_METHOD +void SCEV::dump() const { + print(dbgs()); + dbgs() << '\n'; +} + void SCEV::print(raw_ostream &OS) const { switch (static_cast(getSCEVType())) { case scConstant: -- 2.34.1