Mercurial > projects > ldc
view gen/logger.h @ 1214:7e5547d8e59f
Give all symbols nested in functions internal linkage, unless it's one of the
other special cases.
(for example: this shouldn't be done if the symbol in question is also nested
in a template; such symbols should get template-like linkage)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 13 Apr 2009 16:16:03 +0200 |
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