Mercurial > projects > ldc
annotate gen/logger.h @ 131:5825d48b27d1 trunk
[svn r135] * Merged DMD 1.025 *
* Fixed a minor linking order mishap *
* Added an command line option -annotate *
* Fixed some problems with running optimizations *
* Added std.stdio and dependencies to lphobos (still not 100% working, but compiles and links) *
* Fixed problems with passing aggregate types to variadic functions *
* Added initial code towards full GC support, currently based on malloc and friends, not all the runtime calls the GC yet for memory *
* Fixed problems with resolving nested function context pointers for some heavily nested cases *
* Redid function argument passing + other minor code cleanups, still lots to do on this end... *
author | lindquist |
---|---|
date | Fri, 04 Jan 2008 01:38:42 +0100 |
parents | 61615fa85940 |
children | 1700239cab2e |
rev | line source |
---|---|
1 | 1 #ifndef _llvmd_gen_logger_h_ |
2 #define _llvmd_gen_logger_h_ | |
3 | |
4 #include <iostream> | |
5 | |
6 namespace Logger | |
7 { | |
8 void indent(); | |
9 void undent(); | |
10 std::ostream& cout(); | |
38
27b2f40bdb58
[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.
lindquist
parents:
1
diff
changeset
|
11 void println(const char* fmt, ...); |
27b2f40bdb58
[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.
lindquist
parents:
1
diff
changeset
|
12 void print(const char* fmt, ...); |
27b2f40bdb58
[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.
lindquist
parents:
1
diff
changeset
|
13 void enable(); |
27b2f40bdb58
[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.
lindquist
parents:
1
diff
changeset
|
14 void disable(); |
131 | 15 bool enabled(); |
94
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
38
diff
changeset
|
16 |
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
38
diff
changeset
|
17 void attention(const char* fmt, ...); |
1 | 18 |
19 struct LoggerScope | |
20 { | |
21 LoggerScope() | |
22 { | |
23 Logger::indent(); | |
24 } | |
25 ~LoggerScope() | |
26 { | |
27 Logger::undent(); | |
28 } | |
29 }; | |
30 } | |
31 | |
32 #define LOG_SCOPE Logger::LoggerScope _logscope; | |
38
27b2f40bdb58
[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.
lindquist
parents:
1
diff
changeset
|
33 |
1 | 34 #endif |
35 |