Files
ldc/gen/logger.h
Frits van Bommel 434cb74980 Fix a bug where ::warning() was called with a va_list argument instead of an
actual vararg list.
Also cleaned up the format for warnings. (Previously some would start with
"warning - warning - Warning:" which was a bit redundant)
2009-03-18 15:03:17 +01:00

38 lines
625 B
C++

#ifndef _llvmd_gen_logger_h_
#define _llvmd_gen_logger_h_
#include "llvm/Support/Streams.h"
struct Loc;
namespace Logger
{
void indent();
void undent();
llvm::OStream cout();
void println(const char* fmt, ...);
void print(const char* fmt, ...);
void enable();
void disable();
bool enabled();
void attention(Loc loc, const char* fmt, ...);
struct LoggerScope
{
LoggerScope()
{
Logger::indent();
}
~LoggerScope()
{
Logger::undent();
}
};
}
#define LOG_SCOPE Logger::LoggerScope _logscope;
#endif