瀏覽代碼

* 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 年之前
父節點
當前提交
4e3f504caa
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/llvm/hlcgllvm.pas

+ 1 - 0
compiler/llvm/hlcgllvm.pas

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