ruby: append transition comment only when in opt/debug
authorNilay Vaish <nilay@cs.wisc.edu>
Sat, 29 Jun 2013 02:42:27 +0000 (21:42 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Sat, 29 Jun 2013 02:42:27 +0000 (21:42 -0500)
src/mem/slicc/symbols/StateMachine.py

index a110092b640fecf9dee05e58b3087d8b903f39ca..1eb72972f53f40385a0072986bf8d9e20083b3b5 100644 (file)
@@ -453,7 +453,12 @@ std::vector<std::vector<Stats::Vector *> >  $c_ident::transVec;
 
 // for adding information to the protocol debug trace
 stringstream ${ident}_transitionComment;
+
+#ifndef NDEBUG
 #define APPEND_TRANSITION_COMMENT(str) (${ident}_transitionComment << str)
+#else
+#define APPEND_TRANSITION_COMMENT(str) do {} while (0)
+#endif
 
 /** \\brief constructor */
 $c_ident::$c_ident(const Params *p)