diff dmd/template.h @ 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 b30fe7e1dbb9
children 0b26cfb2d445
line wrap: on
line diff
--- a/dmd/template.h	Thu Mar 26 20:45:53 2009 +0100
+++ b/dmd/template.h	Fri Mar 27 17:54:27 2009 +0100
@@ -91,9 +91,11 @@
 
     TemplateTupleParameter *isVariadic();
     int isOverloadable();
-    
+
+#if IN_LLVM
     // LDC
     std::string intrinsicName;
+#endif
 };
 
 struct TemplateParameter
@@ -310,7 +312,9 @@
     char *toChars();
     char *mangle();
 
+#if IN_DMD
     void toObjFile(int multiobj);			// compile to .obj file
+#endif
 
     // Internal
     static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs);
@@ -324,11 +328,15 @@
     TemplateInstance *isTemplateInstance() { return this; }
     AliasDeclaration *isAliasDeclaration();
 
+#if IN_LLVM
     // LDC
     TemplateInstance *tinst; // enclosing template instance
     Module* tmodule; // module from outermost enclosing template instantiation
     Module* emittedInModule; // which module this template instance has been emitted in
     void printInstantiationTrace();
+
+    void codegen(Ir*);
+#endif
 };
 
 struct TemplateMixin : TemplateInstance
@@ -351,9 +359,15 @@
     char *mangle();
     void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
 
+#if IN_DMD
     void toObjFile(int multiobj);			// compile to .obj file
+#endif
 
     TemplateMixin *isTemplateMixin() { return this; }
+
+#if IN_LLVM
+    void codegen(Ir*);
+#endif
 };
 
 Expression *isExpression(Object *o);