Mercurial > projects > ldc
view gen/logger.h @ 1079:4e388d9d0e25
Intrinsics overhaul:
- More error checking for pragma(intrinsic)
- Properly handle templating for real (use actual nr of bits, not .sizeof * 8)
- Template all .i* and .f* intrinsics
- The old names are deprecated aliases now
I also added a preliminary patch to make tango.math.Math use the new versions.
(I think it looks a lot nicer now)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 10 Mar 2009 04:45:32 +0100 |
parents | 18ad5601dff7 |
children | e7f0c2b48047 |
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(const Loc& loc, const char* fmt, ...); struct LoggerScope { LoggerScope() { Logger::indent(); } ~LoggerScope() { Logger::undent(); } }; } #define LOG_SCOPE Logger::LoggerScope _logscope; #endif