Mercurial > projects > ldc
annotate gen/logger.h @ 715:30b42a283c8e
Removed TypeOpaque from DMD.
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:55:33 +0200 |
parents | 1700239cab2e |
children | 18ad5601dff7 |
rev | line source |
---|---|
1 | 1 #ifndef _llvmd_gen_logger_h_ |
2 #define _llvmd_gen_logger_h_ | |
3 | |
4 #include <iostream> | |
5 | |
132 | 6 struct Loc; |
7 | |
1 | 8 namespace Logger |
9 { | |
10 void indent(); | |
11 void undent(); | |
12 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
|
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 |