mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 21:38:18 +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);
|
||||
var
|
||||
tl: ptemprecord;
|
||||
oldfileinfo: tfileposinfo;
|
||||
begin
|
||||
reference_reset_base(ref,cg.gettempregister(list),0,alignment);
|
||||
new(tl);
|
||||
@ -101,8 +102,16 @@ implementation
|
||||
{ TODO: add llvm.lifetime.start() for this allocation and afterwards
|
||||
llvm.lifetime.end() for freetemp (if the llvm version supports it) }
|
||||
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));
|
||||
if assigned(current_procinfo) then
|
||||
current_filepos:=oldfileinfo;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user