Mercurial > projects > ddmd
annotate dmd/codegen/linkhelper.d @ 157:b7b61140701d
* added all missing default cases in switch statements
+ Lexer.getDocComment
+ Lexer.combineComments
author | trass3r |
---|---|
date | Thu, 16 Sep 2010 01:34:10 +0200 |
parents | 31c086f76669 |
children | b64060ab22df |
rev | line source |
---|---|
140 | 1 module dmd.codegen.linkhelper; |
2 | |
3 import dmd.Loc; | |
4 import dmd.Util; | |
5 | |
6 import core.stdc.stdarg; | |
7 import std.conv; | |
8 | |
9 // help resolve some linker dependencies from the backend back into the frontend | |
10 | |
11 extern(C++) | |
12 { | |
13 // msc.c wants to access global from out_config_init(), but it should never be called | |
14 struct Global {} | |
157
b7b61140701d
* added all missing default cases in switch statements
trass3r
parents:
140
diff
changeset
|
15 __gshared Global global; |
140 | 16 |
17 void error(const char *filename, uint linnum, const char *format, ...) | |
18 { | |
19 Loc loc; | |
20 loc.filename = to!string(filename); | |
21 loc.linnum = linnum; | |
22 | |
23 va_list ap; | |
24 va_start(ap, format); | |
25 | |
26 char buf[1024]; | |
27 vsprintf(buf.ptr, format, ap); | |
28 va_end( ap ); | |
29 | |
30 dmd.Util.error(loc, to!string(buf)); | |
31 } | |
32 } |