diff gen/main.cpp @ 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 5ebe8224988b
line wrap: on
line diff
--- a/gen/main.cpp	Thu Mar 26 20:45:53 2009 +0100
+++ b/gen/main.cpp	Fri Mar 27 17:54:27 2009 +0100
@@ -362,6 +362,7 @@
     }
 
     // create a proper target
+    Ir ir;
 
     // check -m32/64 sanity
     if (m32bits && m64bits)
@@ -562,7 +563,7 @@
 #endif
 
     // Initialization
-    Type::init();
+    Type::init(&ir);
     Id::initialize();
     Module::init();
     initPrecedence();
@@ -832,7 +833,7 @@
             printf("code      %s\n", m->toChars());
         if (global.params.obj)
         {
-            llvm::Module* lm = m->genLLVMModule(0);
+            llvm::Module* lm = m->genLLVMModule(&ir);
             if (!singleObj)
             {
                 m->deleteObjFile();