diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-06-17 21:50:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-06-17 21:50:25 +0200 |
commit | 473c83961abe4e2fb52c8812e46bf19a41fe52cf (patch) | |
tree | 130b71c9e47b60837257ab7b104adf99d44152b8 /src/ortho/debug/ortho_debug.adb | |
parent | 6581cce8c6ea51b5386156fa4d21bd8f1865f851 (diff) | |
download | ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.gz ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.bz2 ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.zip |
src/ortho: add new_convert.
Diffstat (limited to 'src/ortho/debug/ortho_debug.adb')
-rw-r--r-- | src/ortho/debug/ortho_debug.adb | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/ortho/debug/ortho_debug.adb b/src/ortho/debug/ortho_debug.adb index 30a9478ef..a4c5bc578 100644 --- a/src/ortho/debug/ortho_debug.adb +++ b/src/ortho/debug/ortho_debug.adb @@ -1094,20 +1094,34 @@ package body Ortho_Debug is function New_Convert_Ov (Val : O_Enode; Rtype : O_Tnode) return O_Enode is - subtype O_Enode_Convert is O_Enode_Type (OE_Convert_Ov); Res : O_Enode; begin Check_Ref (Val); if not Check_Conv (Val.Rtype.Kind, Rtype.Kind) then raise Type_Error; end if; - Res := new O_Enode_Convert'(Kind => OE_Convert_Ov, - Rtype => Rtype, - Ref => False, - Conv => Val); + Res := new O_Enode_Type'(Kind => OE_Convert_Ov, + Rtype => Rtype, + Ref => False, + Conv => Val); return Res; end New_Convert_Ov; + function New_Convert (Val : O_Enode; Rtype : O_Tnode) return O_Enode + is + Res : O_Enode; + begin + Check_Ref (Val); + if not Check_Conv (Val.Rtype.Kind, Rtype.Kind) then + raise Type_Error; + end if; + Res := new O_Enode_Type'(Kind => OE_Convert, + Rtype => Rtype, + Ref => False, + Conv => Val); + return Res; + end New_Convert; + function New_Unchecked_Address (Lvalue : O_Lnode; Atype : O_Tnode) return O_Enode is |