Add support for the new va_arg instruction
[oota-llvm.git] / lib / Support / Statistic.cpp
index 4db949a99a203326b93220b9645c1669e02ec4b5..f6645c6ae401132d93e7e12a2b15c7c6fcec1031 100644 (file)
@@ -18,6 +18,7 @@
 #include "Support/CommandLine.h"
 #include <iostream>
 #include <sstream>
+#include <algorithm>
 
 bool DebugFlag;  // DebugFlag - Exported boolean set by the -debug option
 
@@ -29,10 +30,13 @@ unsigned StatisticBase::NumStats = 0;
 static cl::opt<bool>
 Enabled("stats", cl::desc("Enable statistics output from program"));
 
+#ifndef NDEBUG
 // -debug - Command line option to enable the DEBUG statements in the passes.
+// This flag may only be enabled in debug builds.
 static cl::opt<bool, true>
 Debug("debug", cl::desc("Enable debug output"), cl::Hidden,
       cl::location(DebugFlag));
+#endif
 
 struct StatRecord {
   std::string Value;