Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / third-party / benchmark / src / colorprint.h
blob9f6fab9b342268dc7d246aa9e5d265c136e7853a
1 #ifndef BENCHMARK_COLORPRINT_H_
2 #define BENCHMARK_COLORPRINT_H_
4 #include <cstdarg>
5 #include <iostream>
6 #include <string>
8 namespace benchmark {
9 enum LogColor {
10 COLOR_DEFAULT,
11 COLOR_RED,
12 COLOR_GREEN,
13 COLOR_YELLOW,
14 COLOR_BLUE,
15 COLOR_MAGENTA,
16 COLOR_CYAN,
17 COLOR_WHITE
20 std::string FormatString(const char* msg, va_list args);
21 std::string FormatString(const char* msg, ...);
23 void ColorPrintf(std::ostream& out, LogColor color, const char* fmt,
24 va_list args);
25 void ColorPrintf(std::ostream& out, LogColor color, const char* fmt, ...);
27 // Returns true if stdout appears to be a terminal that supports colored
28 // output, false otherwise.
29 bool IsColorTerminal();
31 } // end namespace benchmark
33 #endif // BENCHMARK_COLORPRINT_H_