Mercurial > projects > ldc
comparison dmd2/declaration.c @ 1487:f62347c22d81
Apply changes from r1482 to D2 frontend too. Completely untested, but ldc2
compiles again.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 08 Jun 2009 13:45:26 +0200 |
parents | 638d16625da2 |
children | 54b3c1394d62 |
comparison
equal
deleted
inserted
replaced
1486:9ed0695cb93c | 1487:f62347c22d81 |
---|---|
636 // LDC | 636 // LDC |
637 anonDecl = NULL; | 637 anonDecl = NULL; |
638 offset2 = 0; | 638 offset2 = 0; |
639 | 639 |
640 nakedUse = false; | 640 nakedUse = false; |
641 | |
642 availableExternally = true; // assume this unless proven otherwise | |
641 #endif | 643 #endif |
642 } | 644 } |
643 | 645 |
644 Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s) | 646 Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s) |
645 { | 647 { |
1180 init = init->semantic(sc, type); | 1182 init = init->semantic(sc, type); |
1181 inuse--; | 1183 inuse--; |
1182 } | 1184 } |
1183 } | 1185 } |
1184 | 1186 |
1187 void VarDeclaration::semantic3(Scope *sc) | |
1188 { | |
1189 // LDC | |
1190 if (!global.params.useAvailableExternally) | |
1191 availableExternally = false; | |
1192 | |
1193 // Preserve call chain | |
1194 Declaration::semantic3(sc); | |
1195 } | |
1196 | |
1185 const char *VarDeclaration::kind() | 1197 const char *VarDeclaration::kind() |
1186 { | 1198 { |
1187 return "variable"; | 1199 return "variable"; |
1188 } | 1200 } |
1189 | 1201 |
1574 } | 1586 } |
1575 | 1587 |
1576 void TypeInfoDeclaration::semantic(Scope *sc) | 1588 void TypeInfoDeclaration::semantic(Scope *sc) |
1577 { | 1589 { |
1578 assert(linkage == LINKc); | 1590 assert(linkage == LINKc); |
1591 // LDC | |
1592 if (!global.params.useAvailableExternally) | |
1593 availableExternally = false; | |
1579 } | 1594 } |
1580 | 1595 |
1581 /***************************** TypeInfoConstDeclaration **********************/ | 1596 /***************************** TypeInfoConstDeclaration **********************/ |
1582 | 1597 |
1583 #if DMDV2 | 1598 #if DMDV2 |