aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/llvm35
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-06-17 21:50:25 +0200
committerTristan Gingold <tgingold@free.fr>2020-06-17 21:50:25 +0200
commit473c83961abe4e2fb52c8812e46bf19a41fe52cf (patch)
tree130b71c9e47b60837257ab7b104adf99d44152b8 /src/ortho/llvm35
parent6581cce8c6ea51b5386156fa4d21bd8f1865f851 (diff)
downloadghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.gz
ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.bz2
ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.zip
src/ortho: add new_convert.
Diffstat (limited to 'src/ortho/llvm35')
-rw-r--r--src/ortho/llvm35/ortho_llvm.adb9
-rw-r--r--src/ortho/llvm35/ortho_llvm.ads1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ortho/llvm35/ortho_llvm.adb b/src/ortho/llvm35/ortho_llvm.adb
index a4f4599e6..47509ee74 100644
--- a/src/ortho/llvm35/ortho_llvm.adb
+++ b/src/ortho/llvm35/ortho_llvm.adb
@@ -1586,7 +1586,7 @@ package body Ortho_LLVM is
-- New_Convert_Ov --
--------------------
- function New_Convert_Ov (Val : O_Enode; Rtype : O_Tnode) return O_Enode
+ function New_Convert (Val : O_Enode; Rtype : O_Tnode) return O_Enode
is
Res : ValueRef := Null_ValueRef;
begin
@@ -1677,11 +1677,16 @@ package body Ortho_LLVM is
-- Set_Insn_Dbg (Res);
return O_Enode'(LLVM => Res, Etype => Rtype);
else
- raise Program_Error with "New_Convert_Ov: not implemented for "
+ raise Program_Error with "New_Convert: not implemented for "
& ON_Type_Kind'Image (Val.Etype.Kind)
& " -> "
& ON_Type_Kind'Image (Rtype.Kind);
end if;
+ end New_Convert;
+
+ function New_Convert_Ov (Val : O_Enode; Rtype : O_Tnode) return O_Enode is
+ begin
+ return New_Convert (Val, Rtype);
end New_Convert_Ov;
-----------------
diff --git a/src/ortho/llvm35/ortho_llvm.ads b/src/ortho/llvm35/ortho_llvm.ads
index 85f52b796..244b46e2e 100644
--- a/src/ortho/llvm35/ortho_llvm.ads
+++ b/src/ortho/llvm35/ortho_llvm.ads
@@ -336,6 +336,7 @@ package Ortho_LLVM is
-- Allowed conversions are:
-- FIXME: to write.
function New_Convert_Ov (Val : O_Enode; Rtype : O_Tnode) return O_Enode;
+ function New_Convert (Val : O_Enode; Rtype : O_Tnode) return O_Enode;
-- Get the address of LVALUE.
-- ATYPE must be a type access whose designated type is the type of LVALUE.