Mercurial > projects > ldc
diff dmd/attrib.c @ 1195:e961851fb8be
Merged DMD 1.042.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 03 Apr 2009 17:59:34 +0200 |
parents | 4454126b4345 |
children | 229e02867307 |
line wrap: on
line diff
--- a/dmd/attrib.c Fri Apr 03 17:02:52 2009 +0200 +++ b/dmd/attrib.c Fri Apr 03 17:59:34 2009 +0200 @@ -1,6 +1,6 @@ // Compiler implementation of the D programming language -// Copyright (c) 1999-2008 by Digital Mars +// Copyright (c) 1999-2009 by Digital Mars // All Rights Reserved // written by Walter Bright // http://www.digitalmars.com @@ -322,7 +322,7 @@ sc->stc = stc; } -void StorageClassDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs) +void StorageClassDeclaration::stcToCBuffer(OutBuffer *buf, int stc) { struct SCstring { @@ -350,18 +350,19 @@ // { STCtls, TOKtls }, }; - int written = 0; for (int i = 0; i < sizeof(table)/sizeof(table[0]); i++) { if (stc & table[i].stc) { - if (written) - buf->writeByte(' '); - written = 1; buf->writestring(Token::toChars(table[i].tok)); + buf->writeByte(' '); } } +} +void StorageClassDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs) +{ + stcToCBuffer(buf, stc); AttribDeclaration::toCBuffer(buf, hgs); } @@ -1193,6 +1194,18 @@ name[se->len] = 0; obj_includelib(name); } +#if DMDV2 + else if (ident == Id::startaddress) + { + assert(args && args->dim == 1); + Expression *e = (Expression *)args->data[0]; + Dsymbol *sa = getDsymbol(e); + FuncDeclaration *f = sa->isFuncDeclaration(); + assert(f); + Symbol *s = f->toSymbol(); + obj_startaddress(s); + } +#endif AttribDeclaration::toObjFile(multiobj); } #endif