Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- a/dmd2/declaration.c Mon Jun 08 12:35:55 2009 +0200 +++ b/dmd2/declaration.c Mon Jun 08 13:45:26 2009 +0200 @@ -638,6 +638,8 @@ offset2 = 0; nakedUse = false; + + availableExternally = true; // assume this unless proven otherwise #endif } @@ -1182,6 +1184,16 @@ } } +void VarDeclaration::semantic3(Scope *sc) +{ + // LDC + if (!global.params.useAvailableExternally) + availableExternally = false; + + // Preserve call chain + Declaration::semantic3(sc); +} + const char *VarDeclaration::kind() { return "variable"; @@ -1576,6 +1588,9 @@ void TypeInfoDeclaration::semantic(Scope *sc) { assert(linkage == LINKc); + // LDC + if (!global.params.useAvailableExternally) + availableExternally = false; } /***************************** TypeInfoConstDeclaration **********************/