Mercurial > projects > ldc
annotate gen/logger.h @ 1112:829ac3f30103
Updating revisions.pl.in:
- Change the way the LLVM SVN revision is detected, using `svn info` instead
of `svnversion`. This speeds it up significantly on my machine (especially
when the LLVM SVN checkout isn't in disk cache).
- Add "last changed date" to SVN checkouts too, not just unpacked tarballs
- No longer rely on SVN revision to detect release vs trunk checkouts, treat
release checkout the same as unpacked release tarball. (Except for date
determination, which uses SVN date instead of filesystem date)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 13 Mar 2009 16:18:01 +0100 |
parents | 18ad5601dff7 |
children | e7f0c2b48047 |
rev | line source |
---|---|
1 | 1 #ifndef _llvmd_gen_logger_h_ |
2 #define _llvmd_gen_logger_h_ | |
3 | |
994
18ad5601dff7
Use LLVM OStream wrapper instead of <iostream> in the logger.
Frits van Bommel <fvbommel wxs.nl>
parents:
132
diff
changeset
|
4 #include "llvm/Support/Streams.h" |
1 | 5 |
132 | 6 struct Loc; |
7 | |
1 | 8 namespace Logger |
9 { | |
10 void indent(); | |
11 void undent(); | |
994
18ad5601dff7
Use LLVM OStream wrapper instead of <iostream> in the logger.
Frits van Bommel <fvbommel wxs.nl>
parents:
132
diff
changeset
|
12 llvm::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
|
13 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
|
14 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
|
15 void enable(); |
27b2f40bdb58
[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.
lindquist
parents:
1
diff
changeset
|
16 void disable(); |
131 | 17 bool enabled(); |
94
61615fa85940
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
lindquist
parents:
38
diff
changeset
|
18 |
132 | 19 void attention(const Loc& loc, const char* fmt, ...); |
1 | 20 |
21 struct LoggerScope | |
22 { | |
23 LoggerScope() | |
24 { | |
25 Logger::indent(); | |
26 } | |
27 ~LoggerScope() | |
28 { | |
29 Logger::undent(); | |
30 } | |
31 }; | |
32 } | |
33 | |
34 #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
|
35 |
1 | 36 #endif |
37 |