+ helper to add an extra clause to a landingpad instruction

git-svn-id: branches/debug_eh@40408 -
This commit is contained in:
Jonas Maebe 2018-11-29 21:31:08 +00:00
parent 4e73919676
commit e6c89bbf0a

View File

@ -138,6 +138,8 @@ interface
procedure loadparas(opidx: longint; _paras: tfplist);
procedure loadasmlist(opidx: longint; _asmlist: tasmlist);
procedure landingpad_add_clause(op: tllvmop; def: tdef; kind: TAsmSymbol);
{ register spilling code }
function spilling_get_operation_type(opnr: longint): topertype;override;
function spilling_get_reg_type(opnr: longint): tdef;
@ -474,6 +476,21 @@ uses
end;
procedure taillvm.landingpad_add_clause(op: tllvmop; def: tdef; kind: TAsmSymbol);
var
lastclause,
clause: taillvm;
begin
if llvmopcode<>la_landingpad then
internalerror(2018052001);
clause:=taillvm.exceptclause(op,voidpointertype,nil,nil);
lastclause:=self;
while assigned(lastclause.oper[2]^.ai) do
lastclause:=taillvm(lastclause.oper[2]^.ai);
lastclause.loadtai(2,clause);
end;
function taillvm.spilling_get_operation_type(opnr: longint): topertype;
begin
case llvmopcode of