mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 18:49:15 +02:00
* ensure that the lineinfo of temps corresponds to the lineinfo of the
procedure entry code git-svn-id: branches/hlcgllvm@26980 -
This commit is contained in:
parent
c095a1b06a
commit
839ad45b9e
@ -86,6 +86,7 @@ implementation
|
|||||||
procedure ttgllvm.alloctemp(list: TAsmList; size, alignment: longint; temptype: ttemptype; def: tdef; out ref: treference);
|
procedure ttgllvm.alloctemp(list: TAsmList; size, alignment: longint; temptype: ttemptype; def: tdef; out ref: treference);
|
||||||
var
|
var
|
||||||
tl: ptemprecord;
|
tl: ptemprecord;
|
||||||
|
oldfileinfo: tfileposinfo;
|
||||||
begin
|
begin
|
||||||
reference_reset_base(ref,cg.gettempregister(list),0,alignment);
|
reference_reset_base(ref,cg.gettempregister(list),0,alignment);
|
||||||
new(tl);
|
new(tl);
|
||||||
@ -101,8 +102,16 @@ implementation
|
|||||||
{ TODO: add llvm.lifetime.start() for this allocation and afterwards
|
{ TODO: add llvm.lifetime.start() for this allocation and afterwards
|
||||||
llvm.lifetime.end() for freetemp (if the llvm version supports it) }
|
llvm.lifetime.end() for freetemp (if the llvm version supports it) }
|
||||||
inc(lasttemp);
|
inc(lasttemp);
|
||||||
{ allocation for the temp }
|
{ allocation for the temp -- should have lineinfo of the start of the
|
||||||
|
routine }
|
||||||
|
if assigned(current_procinfo) then
|
||||||
|
begin
|
||||||
|
oldfileinfo:=current_filepos;
|
||||||
|
current_filepos:=current_procinfo.procdef.fileinfo;
|
||||||
|
end;
|
||||||
alloclist.concat(taillvm.op_ref_size(la_alloca,ref,def));
|
alloclist.concat(taillvm.op_ref_size(la_alloca,ref,def));
|
||||||
|
if assigned(current_procinfo) then
|
||||||
|
current_filepos:=oldfileinfo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user