Mercurial > projects > ldc
comparison dmd/declaration.c @ 1630:44b145be2ef5
Merge dmd 1.056.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 06 Feb 2010 15:53:52 +0000 |
parents | fb2e6707ad17 |
children |
comparison
equal
deleted
inserted
replaced
1629:b07d683ba4d0 | 1630:44b145be2ef5 |
---|---|
833 | 833 |
834 VarDeclaration *v = new VarDeclaration(loc, arg->type, id, ti); | 834 VarDeclaration *v = new VarDeclaration(loc, arg->type, id, ti); |
835 //printf("declaring field %s of type %s\n", v->toChars(), v->type->toChars()); | 835 //printf("declaring field %s of type %s\n", v->toChars(), v->type->toChars()); |
836 v->semantic(sc); | 836 v->semantic(sc); |
837 | 837 |
838 /* | 838 #if !IN_LLVM |
839 // removed for LDC since TupleDeclaration::toObj already creates the fields; | 839 // removed for LDC since TupleDeclaration::toObj already creates the fields; |
840 // adding them to the scope again leads to duplicates | 840 // adding them to the scope again leads to duplicates |
841 if (sc->scopesym) | 841 if (sc->scopesym) |
842 { //printf("adding %s to %s\n", v->toChars(), sc->scopesym->toChars()); | 842 { //printf("adding %s to %s\n", v->toChars(), sc->scopesym->toChars()); |
843 if (sc->scopesym->members) | 843 if (sc->scopesym->members) |
844 sc->scopesym->members->push(v); | 844 sc->scopesym->members->push(v); |
845 } | 845 } |
846 */ | 846 #endif |
847 | |
847 Expression *e = new DsymbolExp(loc, v); | 848 Expression *e = new DsymbolExp(loc, v); |
848 exps->data[i] = e; | 849 exps->data[i] = e; |
849 } | 850 } |
850 TupleDeclaration *v2 = new TupleDeclaration(loc, ident, exps); | 851 TupleDeclaration *v2 = new TupleDeclaration(loc, ident, exps); |
851 v2->isexp = 1; | 852 v2->isexp = 1; |
1488 } | 1489 } |
1489 | 1490 |
1490 void TypeInfoDeclaration::semantic(Scope *sc) | 1491 void TypeInfoDeclaration::semantic(Scope *sc) |
1491 { | 1492 { |
1492 assert(linkage == LINKc); | 1493 assert(linkage == LINKc); |
1493 // LDC | 1494 #if IN_LLVM |
1494 if (!global.params.useAvailableExternally) | 1495 if (!global.params.useAvailableExternally) |
1495 availableExternally = false; | 1496 availableExternally = false; |
1497 #endif | |
1496 } | 1498 } |
1497 | 1499 |
1498 /***************************** TypeInfoConstDeclaration **********************/ | 1500 /***************************** TypeInfoConstDeclaration **********************/ |
1499 | 1501 |
1500 #if DMDV2 | 1502 #if DMDV2 |