[llvm-commits] [llvm] r163888 - /llvm/trunk/lib/Transforms/Scalar/SROA.cpp

Chandler Carruth chandlerc at gmail.com
Fri Sep 14 03:18:51 PDT 2012


Author: chandlerc
Date: Fri Sep 14 05:18:51 2012
New Revision: 163888

URL: http://llvm.org/viewvc/llvm-project?rev=163888&view=rev
Log:
Wrap the dumping and printing routines in NDEBUG and LLVM_ENABLE_DUMP macros.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SROA.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=163888&r1=163887&r2=163888&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Fri Sep 14 05:18:51 2012
@@ -287,12 +287,14 @@
   /// memcpy are ignored.
   Type *getCommonType(iterator I) const;
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   void print(raw_ostream &OS, const_iterator I, StringRef Indent = "  ") const;
   void printUsers(raw_ostream &OS, const_iterator I,
                   StringRef Indent = "  ") const;
   void print(raw_ostream &OS) const;
   void LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED dump(const_iterator I) const;
   void LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED dump() const;
+#endif
 
 private:
   template <typename DerivedT, typename RetT = void> class BuilderBase;
@@ -1054,6 +1056,8 @@
   return Ty;
 }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+
 void AllocaPartitioning::print(raw_ostream &OS, const_iterator I,
                                StringRef Indent) const {
   OS << Indent << "partition #" << (I - begin())
@@ -1102,6 +1106,8 @@
 void AllocaPartitioning::dump(const_iterator I) const { print(dbgs(), I); }
 void AllocaPartitioning::dump() const { print(dbgs()); }
 
+#endif // !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+
 
 namespace {
 /// \brief An optimization pass providing Scalar Replacement of Aggregates.





More information about the llvm-commits mailing list