Mercurial > projects > ddmd
comparison dmd/codegen/linkhelper.d @ 140:31c086f76669
dmd.lib now only contains the backend
backward references from the backend to the frontend are implemented in ddmd
win32_lib.mak is replaced by a patch
also fixed VisualD project file predefined versions
author | Trass3r |
---|---|
date | Tue, 14 Sep 2010 01:54:48 +0200 |
parents | |
children | b7b61140701d |
comparison
equal
deleted
inserted
replaced
139:bc45b1c53019 | 140:31c086f76669 |
---|---|
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 {} | |
15 Global global; | |
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 } |