Mercurial > projects > ldc
annotate gen/logger.h @ 1193:c271eca933fb
Don't expand tilde ('~') in paths unless it's the first character of the path
in question.
This should fix #255.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 03 Apr 2009 16:35:47 +0200 |
parents | e7f0c2b48047 |
children | 79758fd2f48a |
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 |
1124
e7f0c2b48047
Fix a bug where ::warning() was called with a va_list argument instead of an
Frits van Bommel <fvbommel wxs.nl>
parents:
994
diff
changeset
|
19 void attention(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 |