Mercurial > projects > ldc
comparison dmd/declaration.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 | 1860414bf3b7 |
children | 0c03ba6f7c24 |
comparison
equal
deleted
inserted
replaced
1194:1853dcd9b944 | 1195:e961851fb8be |
---|---|
1 | 1 |
2 // Compiler implementation of the D programming language | 2 // Compiler implementation of the D programming language |
3 // Copyright (c) 1999-2008 by Digital Mars | 3 // Copyright (c) 1999-2009 by Digital Mars |
4 // All Rights Reserved | 4 // All Rights Reserved |
5 // written by Walter Bright | 5 // written by Walter Bright |
6 // http://www.digitalmars.com | 6 // http://www.digitalmars.com |
7 // License for redistribution is by either the Artistic License | 7 // License for redistribution is by either the Artistic License |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | 8 // in artistic.txt, or the GNU General Public License in gnu.txt. |
1096 return s; | 1096 return s; |
1097 } | 1097 } |
1098 | 1098 |
1099 void VarDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs) | 1099 void VarDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs) |
1100 { | 1100 { |
1101 if (storage_class & STCconst) | 1101 StorageClassDeclaration::stcToCBuffer(buf, storage_class); |
1102 buf->writestring("const "); | 1102 |
1103 if (storage_class & STCstatic) | 1103 /* If changing, be sure and fix CompoundDeclarationStatement::toCBuffer() |
1104 buf->writestring("static "); | 1104 * too. |
1105 if (storage_class & STCauto) | 1105 */ |
1106 buf->writestring("auto "); | |
1107 #if DMDV2 | |
1108 if (storage_class & STCmanifest) | |
1109 buf->writestring("manifest "); | |
1110 if (storage_class & STCinvariant) | |
1111 buf->writestring("invariant "); | |
1112 if (storage_class & STCtls) | |
1113 buf->writestring("__thread "); | |
1114 #endif | |
1115 | |
1116 if (type) | 1106 if (type) |
1117 type->toCBuffer(buf, ident, hgs); | 1107 type->toCBuffer(buf, ident, hgs); |
1118 else | 1108 else |
1119 buf->writestring(ident->toChars()); | 1109 buf->writestring(ident->toChars()); |
1120 if (init) | 1110 if (init) |