diff dmd/mars.c @ 129:8096ba7082db trunk

[svn r133] Fixed some problems with inlining not happening :P Fixed problems with certain cases of deeply nested classes/functions.
author lindquist
date Fri, 28 Dec 2007 22:55:24 +0100
parents facc562f5674
children a7dfa0ed966c
line wrap: on
line diff
--- a/dmd/mars.c	Fri Nov 30 17:12:08 2007 +0100
+++ b/dmd/mars.c	Fri Dec 28 22:55:24 2007 +0100
@@ -264,6 +264,7 @@
     global.params.useArrayBounds = 0;
     global.params.useSwitchError = 0;
     global.params.useInline = 0; // this one messes things up to a point where codegen breaks
+    global.params.llvmInline = 0; // use this one instead to know if inline passes should be run
     global.params.obj = 1;
     global.params.Dversion = 2;
 
@@ -471,9 +472,10 @@
 #endif
 	    else if (strcmp(p + 1, "inline") == 0) {
             // TODO
-            // the ast rewrites dmd does for inling messes up the ast
+            // the ast rewrites dmd does for inlining messes up the ast.
             // someday maybe we can support it, for now llvm does an excellent job at inlining
             global.params.useInline = 0; //1
+            global.params.llvmInline = 1;
         }
 	    else if (strcmp(p + 1, "nofloat") == 0)
 		global.params.nofloat = 1;