Mercurial > projects > ddmd
comparison dmd/Declaration.d @ 183:190ba98276b3
Several changes to make it build on posix systems.
I've only tried to build on Mac OS X but it should build on Linux now as well.
This should also fix ticket #9.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 25 Oct 2010 15:36:13 +0200 |
parents | cd48cb899aee |
children | 9f4e5ac4f0a3 |
comparison
equal
deleted
inserted
replaced
181:aa70dca07cb0 | 183:190ba98276b3 |
---|---|
12 import dmd.Loc; | 12 import dmd.Loc; |
13 import dmd.STC; | 13 import dmd.STC; |
14 import dmd.FuncDeclaration; | 14 import dmd.FuncDeclaration; |
15 import dmd.VarDeclaration; | 15 import dmd.VarDeclaration; |
16 import dmd.OutBuffer; | 16 import dmd.OutBuffer; |
17 | |
18 version (CPP_MANGLE) | |
19 { | |
20 import dmd.backend.glue; | |
21 import std.conv : to; | |
22 } | |
17 | 23 |
18 import std.stdio : writef; | 24 import std.stdio : writef; |
19 | 25 |
20 import core.stdc.ctype; | 26 import core.stdc.ctype; |
21 import core.stdc.stdio : sprintf; | 27 import core.stdc.stdio : sprintf; |
244 case LINK.LINKpascal: | 250 case LINK.LINKpascal: |
245 return ident.toChars(); | 251 return ident.toChars(); |
246 | 252 |
247 case LINK.LINKcpp: | 253 case LINK.LINKcpp: |
248 version (CPP_MANGLE) { | 254 version (CPP_MANGLE) { |
249 return cpp_mangle(this); | 255 return to!(string)(cpp_mangle(this)); |
250 } else { | 256 } else { |
251 // Windows C++ mangling is done by C++ back end | 257 // Windows C++ mangling is done by C++ back end |
252 return ident.toChars(); | 258 return ident.toChars(); |
253 } | 259 } |
254 | 260 |