ソースを参照

* allocate datastructures with new() instead of getmem() so that they get
initialised if necessary (such as the targetinfo since the llvmdatalayout
field is an ansistring)

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

Jonas Maebe 11 年 前
コミット
b36e244e34
1 ファイル変更3 行追加3 行削除
  1. 3 3
      compiler/systems.pas

+ 3 - 3
compiler/systems.pas

@@ -637,7 +637,7 @@ begin
   if assigned(targetinfos[t]) then
   if assigned(targetinfos[t]) then
    writeln('Warning: Target is already registered!')
    writeln('Warning: Target is already registered!')
   else
   else
-   Getmem(targetinfos[t],sizeof(tsysteminfo));
+   new(targetinfos[t]);
   targetinfos[t]^:=r;
   targetinfos[t]^:=r;
 end;
 end;
 
 
@@ -648,7 +648,7 @@ var
 begin
 begin
   t:=r.id;
   t:=r.id;
   if not assigned(resinfos[t]) then
   if not assigned(resinfos[t]) then
-    Getmem(resinfos[t],sizeof(tresinfo));
+    new(resinfos[t]);
   resinfos[t]^:=r;
   resinfos[t]^:=r;
   resinfos[t]^.resourcefileclass:=rcf;
   resinfos[t]^.resourcefileclass:=rcf;
 end;
 end;
@@ -662,7 +662,7 @@ begin
   if assigned(arinfos[t]) then
   if assigned(arinfos[t]) then
     writeln('Warning: ar is already registered!')
     writeln('Warning: ar is already registered!')
   else
   else
-    Getmem(arinfos[t],sizeof(tarinfo));
+    new(arinfos[t]);
   arinfos[t]^:=r;
   arinfos[t]^:=r;
 end;
 end;