From 54e3121ad9342b04b602c6fb494ea418957ade82 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Thu, 6 Jan 2011 20:06:27 +0300 Subject: [PATCH] Reverted "Fixed passing of structs and static arrays into functions." --- gen/functions.cpp | 4 ---- ir/irfunction.cpp | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/gen/functions.cpp b/gen/functions.cpp index 02dbe2e6..f56560da 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -752,11 +752,7 @@ void DtoDefineFunction(FuncDeclaration* fd) bool refout = vd->storage_class & (STCref | STCout); bool lazy = vd->storage_class & STClazy; -#if DMDV2 - if (!refout) -#else if (!refout && (!f->fty.args[i]->byref || lazy)) -#endif { // alloca a stack slot for this first class value arg const LLType* argt; diff --git a/ir/irfunction.cpp b/ir/irfunction.cpp index b2067646..518c85eb 100644 --- a/ir/irfunction.cpp +++ b/ir/irfunction.cpp @@ -86,12 +86,7 @@ void IrFuncTy::getParam(Type* dty, int idx, DValue* val, llvm::Value* lval) return; } - LLValue *rval = val->getRVal(); -#if DMDV2 - if (DtoIsPassedByRef(val->type) && isaPointer(rval)) - rval = DtoLoad(rval); -#endif - DtoStore(rval, lval); + DtoStore(val->getRVal(), lval); } //////////////////////////////////////////////////////////////////////////////