diff dmd/func.c @ 378:d8234836b40f

Get rid of runTimeHack and instead add proper argument info to the frontend declatation.
author Christian Kamm <kamm incasoftware de>
date Tue, 22 Jul 2008 19:24:40 +0200
parents aaade6ded589
children 44f08170f4ef
line wrap: on
line diff
--- a/dmd/func.c	Mon Jul 21 20:36:03 2008 +0200
+++ b/dmd/func.c	Tue Jul 22 19:24:40 2008 +0200
@@ -74,8 +74,6 @@
     nrvo_can = 1;
     nrvo_var = NULL;
     shidden = NULL;
-    // llvmdc
-    runTimeHack = false;
 }
 
 Dsymbol *FuncDeclaration::syntaxCopy(Dsymbol *s)
@@ -2009,12 +2007,16 @@
  * Generate a FuncDeclaration for a runtime library function.
  */
 
-FuncDeclaration *FuncDeclaration::genCfunc(Type *treturn, char *name)
+//
+// LLVMDC: Adjusted to give argument info to the runtime function decl.
+//
+
+FuncDeclaration *FuncDeclaration::genCfunc(Arguments *args, Type *treturn, char *name)
 {
-    return genCfunc(treturn, Lexer::idPool(name));
+    return genCfunc(args, treturn, Lexer::idPool(name));
 }
 
-FuncDeclaration *FuncDeclaration::genCfunc(Type *treturn, Identifier *id)
+FuncDeclaration *FuncDeclaration::genCfunc(Arguments *args, Type *treturn, Identifier *id)
 {
     FuncDeclaration *fd;
     TypeFunction *tf;
@@ -2036,7 +2038,7 @@
     }
     else
     {
-	tf = new TypeFunction(NULL, treturn, 0, LINKc);
+	tf = new TypeFunction(args, treturn, 0, LINKc);
 	fd = new FuncDeclaration(0, 0, id, STCstatic, tf);
 	fd->protection = PROTpublic;
 	fd->linkage = LINKc;