Mercurial > projects > ldc
diff dmd/template.c @ 1147:dbe4af57b240
Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 27 Mar 2009 17:54:27 +0100 |
parents | 1860414bf3b7 |
children | 0b26cfb2d445 |
line wrap: on
line diff
--- a/dmd/template.c Thu Mar 26 20:45:53 2009 +0100 +++ b/dmd/template.c Fri Mar 27 17:54:27 2009 +0100 @@ -337,10 +337,12 @@ #endif d = Dsymbol::arraySyntaxCopy(members); td = new TemplateDeclaration(loc, ident, p, d); - + +#if IN_LLVM // LDC td->intrinsicName = intrinsicName; - +#endif + return td; } @@ -2950,10 +2952,12 @@ this->isnested = NULL; this->errors = 0; +#if IN_LLVM // LDC this->emittedInModule = NULL; this->tinst = NULL; this->tmodule = NULL; +#endif } /***************** @@ -2982,9 +2986,11 @@ this->isnested = NULL; this->errors = 0; +#if IN_LLVM // LDC this->tinst = NULL; this->tmodule = NULL; +#endif assert((size_t)tempdecl->scope > 0x10000); } @@ -3270,6 +3276,7 @@ //printf("setting aliasdecl\n"); aliasdecl = new AliasDeclaration(loc, s->ident, s); +#if IN_LLVM // LDC propagate internal information if (tempdecl->llvmInternal) { s->llvmInternal = tempdecl->llvmInternal; @@ -3277,6 +3284,7 @@ fd->intrinsicName = tempdecl->intrinsicName; } } +#endif } } } @@ -3957,6 +3965,8 @@ } } +#if IN_DMD + void TemplateInstance::toObjFile(int multiobj) { #if LOG @@ -3979,6 +3989,8 @@ } } +#endif + void TemplateInstance::inlineScan() { #if LOG @@ -4559,9 +4571,10 @@ } +#if IN_DMD void TemplateMixin::toObjFile(int multiobj) { //printf("TemplateMixin::toObjFile('%s')\n", toChars()); TemplateInstance::toObjFile(multiobj); } - +#endif \ No newline at end of file