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); } //////////////////////////////////////////////////////////////////////////////