From ec77e64adc667a7b1a7f1608e9fb71e66f83cbcf Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 10 Aug 2014 13:18:59 +0000 Subject: [PATCH] * fixed returns from functions that return their result in a parameter git-svn-id: branches/hlcgllvm@28353 - --- compiler/llvm/hlcgllvm.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/llvm/hlcgllvm.pas b/compiler/llvm/hlcgllvm.pas index 93b2816537..cfe798a86a 100644 --- a/compiler/llvm/hlcgllvm.pas +++ b/compiler/llvm/hlcgllvm.pas @@ -973,7 +973,9 @@ implementation retpara.check_simple_location; retdef:=retpara.location^.def; if is_void(retdef) or - paramanager.ret_in_param(retdef,current_procinfo.procdef) then + { don't check retdef here, it is e.g. a pshortstring in case it's + shortstring that's returned in a parameter } + paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef) then list.concat(taillvm.op_size(la_ret,voidtype)) else begin