瀏覽代碼

* use tprocvardef(def).size (which takes into account far code/data) to determine cgsize for procvars in def_cgsize

git-svn-id: trunk@24844 -
nickysn 12 年之前
父節點
當前提交
bfd65ea550
共有 1 個文件被更改,包括 1 次插入14 次删除
  1. 1 14
      compiler/defutil.pas

+ 1 - 14
compiler/defutil.pas

@@ -1213,20 +1213,7 @@ implementation
                 result := OS_ADDR;
             end;
           procvardef:
-            begin
-              if not tprocvardef(def).is_addressonly then
-                {$if sizeof(pint) = 2}
-                  result:=OS_32
-                {$elseif sizeof(pint) = 4}
-                  result:=OS_64
-                {$elseif sizeof(pint) = 8}
-                  result:=OS_128
-                {$else}
-                  internalerror(200707141)
-                {$endif}
-              else
-                result:=OS_ADDR;
-            end;
+            result:=int_cgsize(def.size);
           stringdef :
             begin
               if is_ansistring(def) or is_wide_or_unicode_string(def) then