Mercurial > projects > ldc
view gen/logger.h @ 1134:152bd2c804d0
Update comments now that LLVM PR3861 has been fixed. However, since
conditionally removing the workaround makes the ABI dependent on LLVM version,
I reconsidered that.
(The same revision of LDC compiling for the same target should probably produce
code that follows the same ABI, right?)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 24 Mar 2009 02:46:57 +0100 |
parents | e7f0c2b48047 |
children | 79758fd2f48a |
line wrap: on
line source
#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