Browse Source

* register the types for the cgparas instead of for the parameters of
procvardefs, as it's those types that we use in the LLVM IR

git-svn-id: trunk@32734 -

Jonas Maebe 9 years ago
parent
commit
cd5db0d186
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/llvm/llvmtype.pas

+ 3 - 2
compiler/llvm/llvmtype.pas

@@ -517,9 +517,10 @@ implementation
           la_type for a procvardef (unless it's a procedure of object/record),
           la_type for a procvardef (unless it's a procedure of object/record),
           which means that recursive references should become plain "procedure"
           which means that recursive references should become plain "procedure"
           types that are then casted to the real type when they are used }
           types that are then casted to the real type when they are used }
+        def.init_paraloc_info(callerside);
         for i:=0 to def.paras.count-1 do
         for i:=0 to def.paras.count-1 do
-          appenddef(list,tparavarsym(def.paras[i]).vardef);
-        appenddef(list,def.returndef);
+          appenddef(list,llvmgetcgparadef(tparavarsym(def.paras[i]).paraloc[callerside],true));
+        appenddef(list,llvmgetcgparadef(def.funcretloc[callerside],true));
         if assigned(def.typesym) and
         if assigned(def.typesym) and
            not def.is_addressonly then
            not def.is_addressonly then
           list.concat(taillvm.op_size(LA_TYPE,record_def(def)));
           list.concat(taillvm.op_size(LA_TYPE,record_def(def)));