Jelajahi Sumber

* don't try to check whether the last parameter of a cdecl function is a
varargs parameter if it doesn't have any parameters

git-svn-id: branches/hlcgllvm@28399 -

Jonas Maebe 11 tahun lalu
induk
melakukan
4e3f504caa
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      compiler/llvm/hlcgllvm.pas

+ 1 - 0
compiler/llvm/hlcgllvm.pas

@@ -403,6 +403,7 @@ implementation
         specify the return type }
       if (po_varargs in pd.procoptions) or
          ((pd.proccalloption in cdecl_pocalls) and
+          (pd.paras.count>0) and
           is_array_of_const(tparavarsym(pd.paras[pd.paras.count-1]).vardef)) then
         calldef:=pd
       else